annotate create_input_file.py @ 0:b1f5d49a6f30 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
author rnateam
date Tue, 13 Dec 2016 12:32:11 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
1 import sys
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
2 import os
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
3 wild_fa = sys.argv[1]
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
4 snp_tags = sys.argv[2]
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
5 outfile = sys.argv[3]
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
6 # Write RNA sequence and SNP tags to a outfile
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
7 out = open(outfile,'w')
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
8 with open (wild_fa) as in_fa_handle:
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
9 for line in in_fa_handle:
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
10 out.write(line)
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
11 with open (snp_tags) as in_snp_handle:
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
12 out.write('*'+in_snp_handle.readline())
b1f5d49a6f30 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
13 out.close()