Mercurial > repos > drosofff > bowtie_for_smallrna
comparison sRbowtie/sRbowtie.py @ 4:303baef87cb7 draft
Uploaded
author | drosofff |
---|---|
date | Sat, 21 Jun 2014 09:54:35 -0400 |
parents | 324c3142ca0f |
children |
comparison
equal
deleted
inserted
replaced
3:97da5d474800 | 4:303baef87cb7 |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # small RNA oriented bowtie wrapper | 2 # small RNA oriented bowtie wrapper |
3 # version 1 19-5-2014 | 3 # version 1.01 29-5-2014 |
4 # Usage sRbowtie.py <1 input_fasta_file> <2 alignment method> <3 -v mismatches> <4 out_type> <5 buildIndexIfHistory> <6 fasta/bowtie index> <7 bowtie output> <8 ali_fasta> <9 unali_fasta> <10 --num-threads \${GALAXY_SLOTS:-4}> | 4 # Usage sRbowtie.py <1 input_fasta_file> <2 alignment method> <3 -v mismatches> <4 out_type> <5 buildIndexIfHistory> <6 fasta/bowtie index> <7 bowtie output> <8 ali_fasta> <9 unali_fasta> <10 --num-threads \${GALAXY_SLOTS:-4}> |
5 # current rev: for bowtie __norc, move from --supress 2,6,7,8 to --supress 6,7,8. Future Parser must be updated to take into account this standardisation | |
5 # To Do: | 6 # To Do: |
6 # implement number of bowtie processes as a Galaxy env variable | |
7 # implement an arg parser | 7 # implement an arg parser |
8 # Christophe Antoniewski <drosofff@gmail.com> | 8 # Christophe Antoniewski <drosofff@gmail.com> |
9 | 9 |
10 import sys, os, subprocess, tempfile, shutil | 10 import sys, os, subprocess, tempfile, shutil |
11 | 11 |
13 sys.stderr.write( '%s\n' % msg ) | 13 sys.stderr.write( '%s\n' % msg ) |
14 sys.exit() | 14 sys.exit() |
15 | 15 |
16 def bowtieCommandLiner (alignment_method, v_mis, out_type, aligned, unaligned, input, index, output, pslots="12"): | 16 def bowtieCommandLiner (alignment_method, v_mis, out_type, aligned, unaligned, input, index, output, pslots="12"): |
17 if alignment_method=="RNA": | 17 if alignment_method=="RNA": |
18 x = "-v %s -M 1 --best --strata -p %s --norc --suppress 2,6,7,8" % (v_mis, pslots) | 18 x = "-v %s -M 1 --best --strata -p %s --norc --suppress 6,7,8" % (v_mis, pslots) |
19 elif alignment_method=="unique": | 19 elif alignment_method=="unique": |
20 x = "-v %s -m 1 -p %s --suppress 6,7,8" % (v_mis, pslots) | 20 x = "-v %s -m 1 -p %s --suppress 6,7,8" % (v_mis, pslots) |
21 elif alignment_method=="multiple": | 21 elif alignment_method=="multiple": |
22 x = "-v %s -M 1 --best --strata -p %s --suppress 6,7,8" % (v_mis, pslots) | 22 x = "-v %s -M 1 --best --strata -p %s --suppress 6,7,8" % (v_mis, pslots) |
23 elif alignment_method=="k_option": | 23 elif alignment_method=="k_option": |