comparison get_chrom_sizes/calculating_chrom.sizes.py @ 6:c96b29e00427 draft

Uploaded
author jackcurragh
date Tue, 17 May 2022 13:02:31 +0000
parents c6a297d05c8e
children 84664985411c
comparison
equal deleted inserted replaced
5:ec8651ac3d61 6:c96b29e00427
1 # input a genome file and return a file genome.chrom.sizes to be associated with the custom build (or just have it as an output to be used later in the history. 1 # input a genome file and return a file genome.chrom.sizes to be associated with the custom build (or just have it as an output to be used later in the history.
2 # adapted from https://bioexpressblog.wordpress.com/2014/04/15/calculate-length-of-all-sequences-in-an-multi-fasta-file/ 2 # adapted from https://bioexpressblog.wordpress.com/2014/04/15/calculate-length-of-all-sequences-in-an-multi-fasta-file/
3 from sys import argv 3 from sys import argv
4 # python calculating_chrom.sizes.py genome_input.fa output.chrom.sizes 4 # python calculating_chrom.sizes.py genome_input.fa output.chrom.sizes
5 genome = str(argv[1]) 5 fasta_source = str(argv[1])
6 prefix = str(argv[2]) 6 genome = str(argv[2])
7 output = str(argv[3]) 7 builtin = str(argv[3])
8 prefix = str(argv[4])
9 output = str(argv[5])
8 # genome = 'test-data/test.fasta' 10 # genome = 'test-data/test.fasta'
9 # output = "test-data/test_chrom.sizes" 11 # output = "test-data/test_chrom.sizes"
10 12
11 chromSizesoutput = open(output,"w") 13 chromSizesoutput = open(output,"w")
12 14