Mercurial > repos > jjohnson > mzsqlite_psm_align
changeset 5:af5f22779a8e draft
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/mzsqlite_psm_align commit d65efea03eb2db8a43e64599a4f899ead1a252ba-dirty
author | jjohnson |
---|---|
date | Tue, 10 Apr 2018 11:52:04 -0400 |
parents | a96b2754171c |
children | 100cff4db790 |
files | mzsqlite_psm_align.py mzsqlite_psm_align.xml |
diffstat | 2 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mzsqlite_psm_align.py Tue Apr 10 10:55:22 2018 -0400 +++ b/mzsqlite_psm_align.py Tue Apr 10 11:52:04 2018 -0400 @@ -409,7 +409,7 @@ '-r', '--reads_bam', default=None, help='reads alignment bam path') parser.add_argument( - '-g', '--gffutils_file', default=None, + '-g', '--gffutils_sqlite', default=None, help='gffutils GTF sqlite DB') parser.add_argument( '-B', '--probed', default=None, @@ -443,9 +443,9 @@ probed = open(args.probed,'w') if args.probed else sys.stdout - gff_cursor = get_connection(args.gffutils_file).cursor() if args.gffutils_file else None + gff_cursor = get_connection(args.gffutils_sqlite).cursor() if args.gffutils_sqlite else None map_cursor = get_connection(args.genomic_mapping_sqlite).cursor() - mz_cursor = get_connection(args.mzsqlite_file).cursor() + mz_cursor = get_connection(args.mzsqlite).cursor() unmapped_accs = set() timings = dict() @@ -656,7 +656,8 @@ add_time('GENOMIC_POS_QUERY',te - ts) except: unmapped_accs.add(acc) - print('Unmapped: %s' % acc, file=sys.stderr) + if args.debug: + print('Unmapped: %s' % acc, file=sys.stderr) return len(locations) return -1 @@ -729,7 +730,8 @@ bases.append(list(set([c[i] for c in aa_codon_map[aa]]))) else: bases.append([b for b, cnt in reversed(sorted(pileup[idx + i]['bases'].iteritems(), key=lambda (k,v): (v,k)))]) - print('%s' % bases) + if args.debug: + print('%s' % bases,file=sys.stderr) for b0 in bases[0]: if b0 not in aa_na_map[aa]: continue @@ -812,7 +814,7 @@ 'XG' : 'A', #Peptide type 'XU' : 'Z', #URI """ - psm_cursor = get_connection(args.mzsqlite_file).cursor() + psm_cursor = get_connection(args.mzsqlite).cursor() ts = time() psms = psm_cursor.execute(PSM_QUERY) te = time()
--- a/mzsqlite_psm_align.xml Tue Apr 10 10:55:22 2018 -0400 +++ b/mzsqlite_psm_align.xml Tue Apr 10 11:52:04 2018 -0400 @@ -7,6 +7,10 @@ <requirement type="package">gffutils</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ + #if $readlignments: + ln -s -f '${$readlignments}' 'input.bam' && + ln -s -f '${$readlignments.metadata.bam_index}' 'input.bam.bai' && + #end if python '$__tool_directory__/mzsqlite_psm_align.py' #if $ref.ref_source == 'cached': --twobit='$ref.ref_loc.fields.path' @@ -17,7 +21,7 @@ --gffutils_file '$gffutilsdb' #end if #if $readlignments: - --reads_bam '$readlignments' + --reads_bam 'input.bam' #end if #if 'probed' in str($output_formats).split(','): --probed '$probed' @@ -62,13 +66,13 @@ </param> </inputs> <outputs> - <data name="prosam" format="sam"> + <data name="prosam" format="sam" label="pro.SAM on ${on_string}"> <filter>'prosam' in output_formats</filter> </data> - <data name="probam" format="pro.bam"> + <data name="probam" format="bam" label="pro.Bam on ${on_string}"> <filter>'probam' in output_formats</filter> </data> - <data name="probed" format="pro.bed"> + <data name="probed" format="bed" label="pro.Bed on ${on_string}"> <filter>'probed' in output_formats</filter> </data> </outputs>