comparison get_chrom_sizes/calculating_chrom.sizes.py @ 15:c7e2879bf357 draft

Uploaded
author jackcurragh
date Tue, 17 May 2022 13:49:26 +0000
parents 84664985411c
children ab7b5928faea
comparison
equal deleted inserted replaced
14:afd11143fb67 15:c7e2879bf357
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 fasta_source = str(argv[1]) 5 fasta_source = str(argv[1])
6 genome = str(argv[2]) 6 prefix = str(argv[2])
7 builtin = str(argv[3]) 7 output = str(argv[3])
8 prefix = str(argv[4]) 8 genome = str(argv[4])
9 output = str(argv[5]) 9 builtin = str(argv[5])
10
10 # genome = 'test-data/test.fasta' 11 # genome = 'test-data/test.fasta'
11 # output = "test-data/test_chrom.sizes" 12 # output = "test-data/test_chrom.sizes"
12 print(fasta_source, genome, builtin, prefix, output) 13 print(fasta_source, genome, builtin, prefix, output)
13 if fasta_source == 'builtin': 14 if fasta_source == 'builtin':
14 genome = builtin 15 genome = builtin