annotate create_input_file.py @ 0:01f42efba177 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 11:47:56 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
01f42efba177 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
1 import sys
01f42efba177 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
2 import os
01f42efba177 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]
01f42efba177 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]
01f42efba177 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]
01f42efba177 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
01f42efba177 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')
01f42efba177 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:
01f42efba177 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:
01f42efba177 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)
01f42efba177 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:
01f42efba177 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())
01f42efba177 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/remurna commit 6e51a331dbeab2786d8df5fd379ae3a63eb61d83
rnateam
parents:
diff changeset
13 out.close()