Mercurial > repos > mheinzl > fsd_bvsa
changeset 2:e8115b71edbd draft
planemo upload for repository https://github.com/monikaheinzl/galaxyProject/tree/master/tools/fsd_beforevsafter commit b9403b3ce2b7a41fa8ee1aa47909152de78cf641
author | mheinzl |
---|---|
date | Tue, 15 May 2018 13:50:02 -0400 |
parents | 6ed6dca9488f |
children | 327c40a821ed |
files | fsd_beforevsafter.py fsd_beforevsafter.xml |
diffstat | 2 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/fsd_beforevsafter.py Sat May 12 04:51:34 2018 -0400 +++ b/fsd_beforevsafter.py Tue May 15 13:50:02 2018 -0400 @@ -11,7 +11,7 @@ # The program produces a plot which shows the distribution of family sizes of the DCS from the input files and # a CSV file with the data of the plot. -# USAGE: python FSD before vs after_no_refF1.3_FINAL.py --inputFile_SSCS filenameSSCS --makeDCS filenameMakeDCS --afterTrimming filenameAfterTrimming -- alignedTags filenameTagsRefGenome +# USAGE: python FSD before vs after_no_refF1.3_FINAL.py --inputFile_SSCS filenameSSCS --inputName1 filenameSSCS --makeDCS filenameMakeDCS --afterTrimming filenameAfterTrimming -- alignedTags filenameTagsRefGenome # --sep "characterWhichSeparatesCSVFile" --output_csv outptufile_name_csv --output_pdf outptufile_name_pdf @@ -46,6 +46,7 @@ parser = argparse.ArgumentParser(description='Analysis of read loss in duplex sequencing data') parser.add_argument('--inputFile_SSCS', help='Tabular File with three columns: ab or ba, tag and family size.') + parser.add_argument('--inputName1') parser.add_argument('--makeDCS', help='FASTA File with information about tag and family size in the header.') parser.add_argument('--afterTrimming',default=None, @@ -65,6 +66,7 @@ args = parser.parse_args(argv[1:]) SSCS_file = args.inputFile_SSCS + SSCS_file_name = args.inputName1 makeConsensus = args.makeDCS afterTrimming = args.afterTrimming ref_genome = args.alignedTags @@ -80,8 +82,8 @@ ### PLOT ### plt.rc('figure', figsize=(11.69, 8.27)) # A4 format plt.rcParams['axes.facecolor'] = "E0E0E0" # grey background color - plt.rcParams['xtick.labelsize'] = 12 - plt.rcParams['ytick.labelsize'] = 12 + plt.rcParams['xtick.labelsize'] = 14 + plt.rcParams['ytick.labelsize'] = 14 plt.rcParams['patch.edgecolor'] = "black" fig = plt.figure() plt.subplots_adjust(bottom=0.3) @@ -221,9 +223,9 @@ plt.text(0.1, 0.02, legend4, size=11, transform=plt.gcf().transFigure) plt.legend(loc='upper right', fontsize=14, bbox_to_anchor=(0.9, 1), frameon=True) - plt.title("Family Size Distribution of Tags from various Steps of the Galaxy Pipeline", fontsize=14) - plt.xlabel("No. of Family Members", fontsize=12) - plt.ylabel("Absolute Frequency", fontsize=12) + plt.title("Family size distribution of tags from various steps of the Du Novo pipeline", fontsize=14) + plt.xlabel("Family size", fontsize=14) + plt.ylabel("Absolute Frequency", fontsize=14) plt.grid(b=True, which="major", color="#424242", linestyle=":") plt.margins(0.01, None) @@ -231,7 +233,7 @@ plt.close() # write information about plot into a csv file - output_file.write("Dataset:{}{}\n".format(sep, SSCS_file)) + output_file.write("Dataset:{}{}\n".format(sep, SSCS_file_name)) if ref_genome != str(None): output_file.write("{}AB{}BA\n".format(sep, sep)) output_file.write("max. family size:{}{}{}{}\n".format(sep, max(quant_ab_ref), sep, max(quant_ba_ref)))
--- a/fsd_beforevsafter.xml Sat May 12 04:51:34 2018 -0400 +++ b/fsd_beforevsafter.xml Tue May 15 13:50:02 2018 -0400 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<tool id="fsd_beforevsafter" name="Duplex Sequencing Analysis:" version="0.0.2"> +<tool id="fsd_beforevsafter" name="Duplex Sequencing Analysis:" version="0.0.3"> <requirements> <!-- galaxy version 16.04 --> <requirement type="package" version="2.7">python</requirement> @@ -9,7 +9,7 @@ </requirements> <description>Family size distribution (FSD) of tags from various steps of the Du Novo pipeline</description> <command> - python2 $__tool_directory__/fsd_beforevsafter.py --inputFile_SSCS "$file1" --makeDCS "$makeDCS" --afterTrimming "$afterTrimming" --alignedTags "$alignedTags" --sep $separator --output_csv $output_csv --output_pdf $output_pdf + python2 $__tool_directory__/fsd_beforevsafter.py --inputFile_SSCS "$file1" --inputName1 "$file1.name" --makeDCS "$makeDCS" --afterTrimming "$afterTrimming" --alignedTags "$alignedTags" --sep $separator --output_pdf $output_pdf --output_csv $output_csv </command> <inputs> <param name="file1" type="data" format="tabular" label="Dataset 1: input tags of whole dataset" optional="false" help="Input in tabular format with the family size, tags and the direction of the strand ('ab' or 'ba') for each family."/> @@ -58,6 +58,7 @@ + **Dataset 4 (optional):** Finally, a TXT file with the regions and all tags that were aligned to the reference genome can be given as input. This file can obtained from a different tool. +-----------+------------------------------+