Mercurial > repos > artbio > repenrich2
comparison RepEnrich2.py @ 5:08e50af788f7 draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/repenrich2 commit b1761de76fd068b86a06d88e70c1ba1d8644e7b5
author | artbio |
---|---|
date | Sun, 21 Apr 2024 21:52:40 +0000 |
parents | 4905a332a094 |
children | 388a47ca4199 |
comparison
equal
deleted
inserted
replaced
4:c5bb2f9af708 | 5:08e50af788f7 |
---|---|
113 line = line.split('\t') | 113 line = line.split('\t') |
114 counts[line[3]] += int(line[4]) | 114 counts[line[3]] += int(line[4]) |
115 sumofrepeatreads += int(line[4]) | 115 sumofrepeatreads += int(line[4]) |
116 print(f"Identified {sumofrepeatreads} unique reads that mapped to repeats.") | 116 print(f"Identified {sumofrepeatreads} unique reads that mapped to repeats.") |
117 | 117 |
118 # print unique mapper counts | |
119 with open("unique_mapper_counts.tsv", 'w') as fout: | |
120 fout.write("#element\tcount\n") | |
121 for count in sorted(counts): | |
122 fout.write(f"{count}\t{counts[count]}\n") | |
123 | |
118 # multimapper parsing | 124 # multimapper parsing |
119 if not paired_end: | 125 if not paired_end: |
120 args_list = [(metagenome, fastqfile_1) for | 126 args_list = [(metagenome, fastqfile_1) for |
121 metagenome in repeat_list] | 127 metagenome in repeat_list] |
122 with ProcessPoolExecutor(max_workers=cpus) as executor: | 128 with ProcessPoolExecutor(max_workers=cpus) as executor: |