Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an alpha version of a report generator that creats a report of the re… #416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shadizaheri
Copy link
Contributor

This PR is about an alpha version of a report generator that I coded to generate a report using the plots generated in "*.pdf, *.jpg, and *.png" formats in a single doc format.

The way that it works is explained below:
1- Download the zipped folder of the results you want to include in the plots, unzip, and un-tar the folder. Example: let's say using the provided gsutil from your specific workflow you will get the folder named as bwa_samples_aligning_with_dragen_SV_VCF_QC_output.wPlots.tar.gz
you want to go to bwa_samples_aligning_with_dragen_SV_VCF_QC_output folder.

2- to generate the word-doc at the first step, just copy the "alpha_firsttime_report_generator.py" script to the folder containing the plots.
Following the same example: copy the "alpha
first_time_report_generator.py" script in the bwa_samples_aligning_with_dragen_SV_VCF_QC_output/plots/main_plot directory.

3- if you desire to add more plots to the existing document file, please run the "alpha_secondtime_report_generator.py" script and import the name of the desired doc file that exists in the same directory as the plots, "alpha_second_time_report_generator.py" script, and the existing .doc file.
Example:
Let's say that in step 2 you generated a doc being called "bwa_report.doc". So copy the "bwa_report.doc" as well as the "alpha
secondtime_report_generator.py" script to the next directory that you want to include the plots in and then run the "alphasecond_time_report_generator.py" script.

Future improvements that I'm working on:

  1. Make it possible to use it on a Terra notebook (no need to download the files)
  2. Provide only the gsutil of the results one wants to include (no need to manually unzip or untar the folder)
  3. Merge the "alpha_firsttime_report_generator.py" and "alphasecond_time_report_generator.py" python files for the first and second generators into one (with an if statement to check if the doc file exists, and if it does then it'll warn the user and vice versa)

)
# Get the current working directory
cwd = os.getcwd()
output_file = input("This script assumes that there is already a .docx created \n if this is the first time runing this script please first run the alpha_first_time_report_generator.py \n Enter the name of the already existing output file: ")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_file = input("This script assumes that there is already a .docx created \n if this is the first time runing this script please first run the alpha_first_time_report_generator.py \n Enter the name of the already existing output file (do not include the .docx part): ")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants