Mercurial > repos > iuc > circos
comparison fasta-to-karyotype.py @ 6:b84d385679e2 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/circos commit 1584882716a1d2c598e8485da9d73bcf80d9b29a"
author | iuc |
---|---|
date | Fri, 01 May 2020 11:28:11 +0000 |
parents | 890ef899a3d7 |
children |
comparison
equal
deleted
inserted
replaced
5:5d7a5119a8e7 | 6:b84d385679e2 |
---|---|
4 from Bio import SeqIO | 4 from Bio import SeqIO |
5 | 5 |
6 # Process fasta data, extracting only headers | 6 # Process fasta data, extracting only headers |
7 for idx, seq in enumerate(SeqIO.parse(sys.argv[1], "fasta")): | 7 for idx, seq in enumerate(SeqIO.parse(sys.argv[1], "fasta")): |
8 sys.stdout.write( | 8 sys.stdout.write( |
9 "chr - {seq_id} {seq_id} 0 {length} {theme}-{color}\n".format( | 9 "chr - {seq_id} {seq_id} 0 {length} {theme}-{color}\n".format( |
10 seq_id=seq.id, | 10 seq_id=seq.id, |
11 idx=idx, | 11 idx=idx, |
12 length=len(seq), | 12 length=len(seq), |
13 color=((idx + 1) % 12), | 13 color=((idx + 1) % 12), |
14 theme=sys.argv[2], | 14 theme=sys.argv[2], |