Mercurial > repos > boris > getalleleseq
changeset 6:8d0a0c488a8e draft
the "_major" suffix is now suppressed. Only the minor allele sequences are labeled "_minor"
author | boris |
---|---|
date | Fri, 19 Jul 2013 17:49:30 -0400 |
parents | dc78c20610a1 |
children | 28640b50ba2f |
files | getalleleseq.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/getalleleseq.py Tue Jun 25 00:47:05 2013 -0400 +++ b/getalleleseq.py Fri Jul 19 17:49:30 2013 -0400 @@ -25,7 +25,7 @@ # this directory # # The expected columns in the alleles table follow Nicholas Stoler's -# Count alleles tool format. See Count alleles in Galaxy's tool shed +# Variant Annotator tool format. See Variant Annotator in Galaxy's tool shed # http://testtoolshed.g2.bx.psu.edu/repos/nick/allele_counts_1 for more details # # Expected columns: @@ -68,7 +68,8 @@ def printseq(sample,allele,seq,output): """Print out sequence""" - print >> output, '>{0}_{1}'.format(sample,allele) + #print >> output, '>{0}_{1}'.format(sample,allele) + print >> output, '>{0}{1}'.format(sample,allele) for i in range(0,len(seq),70): print >> output, ''.join(seq[i:i+70]) @@ -95,7 +96,8 @@ # Single file for all major allele sequences in FASTA multiple alignment for sample in samples: sequence = createseq(sample,'major',args.seq_length,table) - printseq(sample,'major',sequence,major_out) + #printseq(sample,'major',sequence,major_out) + printseq(sample,'',sequence,major_out) major_out.close() # Sample specific minor allele sequence in FASTA format @@ -112,7 +114,8 @@ minor_name = sample+'-minor.fa' minor_out = open(os.path.join(args.minor_dir, minor_name), 'w+') sequence = createseq(sample,'minor',args.seq_length,table) - printseq(sample,'minor',sequence,minor_out) + #printseq(sample,'minor',sequence,minor_out) + printseq(sample,'_minor',sequence,minor_out) minor_out.close() if __name__ == "__main__": main() \ No newline at end of file