Commit ceefbe8d authored by Schoorlemmer, Joran's avatar Schoorlemmer, Joran
Browse files

Replace extractcounts.py

parent 8e68c018
......@@ -32,9 +32,10 @@ def parse_gtf(in_file, read_length = 100):
# turn into into int to do calculations
trans_len = abs(int(line_cont[4])-int(line_cont[3]))
gene_info = line_cont[8].split(' ')
gene_name = gene_info[5].lstrip('"').rstrip('";')
cov = float(gene_info[11].lstrip('"').rstrip('";'))
genes[gene_name] = round(cov * trans_len /read_length)
if len(gene_info) == 16:
gene_name = gene_info[9].lstrip('"').rstrip('";')
cov = float(gene_info[11].lstrip('"').rstrip('";'))
genes[gene_name] = round(cov * trans_len /read_length)
return genes
......@@ -109,5 +110,4 @@ def main(ref_name, sample_names):
# Run script
if __name__ == "__main__":
#main(argv[1], argv[2])
print(group_replicates(argv[1]))
\ No newline at end of file
main(argv[1], argv[2])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment