Skip to content

Commit

Permalink
Update utils.py (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinpeng021001 committed Apr 18, 2024
1 parent 850c1cf commit 1f06c84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dbcan/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def __init__(self,lines):
def __repr__(self):
return "\t".join([str(getattr(self, value)) for value in vars(self)])

def ReadBedtoos(filename):
def ReadBedtools(filename):
lines = open(filename).readlines()
seqid2info = {line.split()[0]:bedtools_read_count(line.split()) for line in lines[1:]}
seqid2info = {line.split()[0]:bedtools_read_count(line.split()) for line in lines[0:]}
normalized_tpm = 0.
for seqid in seqid2info:
seqid_depth = seqid2info[seqid]
Expand Down Expand Up @@ -241,7 +241,7 @@ def __init__(self,parameters):
#self.fq_reads_count = fq_file_line_count(self.pars.R1)
self.fq_reads_count = total_mapped_reads_count(self.pars.bedtools)
print(f"Total reads count: {self.fq_reads_count}!")
seqid2readcount,normalized_tpm = ReadBedtoos(parameters.bedtools)
seqid2readcount,normalized_tpm = ReadBedtools(parameters.bedtools)
self.normalized_tpm = normalized_tpm
### read overview to
if parameters.function == "fam_abund":
Expand Down

0 comments on commit 1f06c84

Please sign in to comment.