MBoemo / DNAscent

Software for detecting regions of BrdU and EdU incorporation in Oxford Nanopore reads.
https://www.boemogroup.org/
GNU General Public License v3.0
26 stars 13 forks source link

Error using "-l", "-p" or "-z" option: terminate called after throwing an instance of 'std::invalid_argument' what(): stof #8

Closed dspires closed 4 years ago

dspires commented 4 years ago

Hi.

We are using DNAscent to analyze DNA sequences of a culture with 0% of BrdU. DNAscent works well with the following commands, but it returns positive BrdU scores, which is undesirable for a culture that has no BrdU at all.

================================================================================================= # Making DNAscent index. DNAscent index -f ${RAW_READS} -s ${SEQ_SUMMARY}

# Detection of BrdU analog. for FILE in ls input | grep '.bam$' do DNAscent detect -b input/${FILE} -r input/giaLam3.fasta -i index.dnascent -o output/${FILE}.detect -t 100 done

# Call regions of analogue incorporation. for FILE in ls output | grep '.detect$' do DNAscent regions --replication -d output/${FILE} -o output/${FILE}.regions done

================================================================================================

With the option "--replication" above, the program runs smootly. In the case of 0% of BrdU, it is recommended to make use of the options "-p", "-z" and "-l". But each of the following variants below returns the same error:

================================================================================================= DNAscent regions --replication -p -z -d output/${FILE} -o output/${FILE}.regions DNAscent regions -p -z -d output/${FILE} -o output/${FILE}.regions DNAscent regions -l 2.0 -d output/${FILE} -o output/${FILE}.regions

=================================================================================================

The following is the error that is returned by any of the options above, independent of the input file: terminate called after throwing an instance of 'std::invalid_argument' what(): stof

Searching on internet, it seems that the error is related to trying to read a file that had its end already reached. We could not find the use of the method "eof" in the source code, but we have a limited knowledge about C++.

What do you think could possibly be the problem?

Thanks in advance for any help.

-- David da Silva Pires

MBoemo commented 4 years ago

Hi David,

You have to specify values with the -p, -z, and -l flags. So a command like this should work, for instance:

DNAscent regions -p 0.1 -z 1 -d output/${FILE} -o output/${FILE}.regions

(Note that I just made up some numbers here as an example.) I'm surprised the third one didn't work though - that should be a valid command. I just tried it on some test data and wasn't able to reproduce the issue. Can you let me know which commit you're using?

Cheers, Mike