adriantich / DnoisE

Distance denoise by Entropy
GNU General Public License v3.0
12 stars 3 forks source link

Counting lines #17

Open evaegelyng opened 2 years ago

evaegelyng commented 2 years ago

Hi Adria,

In the script MOTUs_from_SWARM.sh, there is the following code to count the number of lines in the MOTUs file:

linies=$(wc -l ${motu_list} | cut -f1 -d ' ')

In my pipeline, I changed this line to python, and got a result a slightly different result:

lines=$(wc -l ${MOTUS2RUN} | cut -f1 -d ' ') # Result: 216268

with open(MOTUS2RUN, 'r') as fp: read = fp.readlines() lines = len(read) # Result: 216269, covering read[0] to reads[216268].

It seems like the result from bash was incorrect by one line? Maybe you could compare the two methods on one of your files and see if you also get different results?

Best,

Eva