Mercurial > repos > galaxyp > cravatool
diff cravatp_submit.py @ 3:a018c44dc18b draft default tip
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cravatp_score_and_annotate commit d80e60ce74aabe64e131d560085af099d52b81cf-dirty
author | galaxyp |
---|---|
date | Fri, 07 Sep 2018 16:53:05 -0400 |
parents | 2c7bcc1219fc |
children |
line wrap: on
line diff
--- a/cravatp_submit.py Thu Aug 16 12:28:29 2018 -0400 +++ b/cravatp_submit.py Fri Sep 07 16:53:05 2018 -0400 @@ -24,15 +24,12 @@ # initializes blank parameters chasm_classifier = '' probed_filename = None -intersected_only = False +all_intersect = False vcf_output = None analysis_type = None # # Testing Command -# python cravatp_submit.py test-data/Freebayes_two-variants.vcf GRCh38 -# test-data/variant.tsv test-data/gene.tsv test-data/noncoding.tsv -# test-data/error.tsv CHASM -—classifier Breast -—proBED -# test-data/MCF7_proBed.bed +# python cravatp_submit.py test-data/Freebayes_two-variants.vcf GRCh38 test-data/variant.tsv test-data/gene.tsv test-data/noncoding.tsv test-data/error.tsv CHASM -—classifier Breast -—proBED test-data/MCF7_proBed.bed parser = argparse.ArgumentParser() parser.add_argument('cravatInput',help='The filename of the input ' 'CRAVAT-formatted tabular file ' @@ -56,11 +53,8 @@ parser.add_argument('--proBED', help='The filename of the proBED file ' 'containing peptides with genomic ' 'coordinates') -parser.add_argument('--intersectOnly', help='Specifies whether to ' - 'analyze only variants ' - 'intersected between the ' - 'CRAVAT input and proBED ' - 'file') +parser.add_argument('--allIntersect', help='Specifies whether to ' + 'analyze all variants') parser.add_argument('--vcfOutput', help='The output filename of the ' 'intersected VCF file') @@ -78,8 +72,8 @@ chasm_classifier = args.classifier if args.proBED: probed_filename = args.proBED -if args.intersectOnly: - intersected_only = args.intersectOnly +if args.allIntersect: + all_intersect = args.allIntersect if args.vcfOutput: vcf_output = args.vcfOutput @@ -118,7 +112,7 @@ # proteogenomic input (proBED) file if the user specifies that they want # to only include intersected variants or if they want to receive the # intersected VCF as well. -if probed_filename and (vcf_output or intersected_only == 'true'): +if probed_filename and (vcf_output or all_intersect == 'false'): proBED = loadProBED() if not vcf_output: vcf_output = 'intersected_input.vcf' @@ -143,7 +137,7 @@ genpos <= pepposB): tsvout.writerow(row) break -if intersected_only == 'true': +if all_intersect == 'false': input_filename = vcf_output # sets up the parameters for submission to the CRAVAT API