to-mr error

89 views
Skip to first unread message

Leone Sophia Hopkins

unread,
May 29, 2014, 11:42:29 AM5/29/14
to meth...@googlegroups.com
Hello, 

I'm experiencing an error for one of my files, but the other ran fine. The error is:

terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create

Is there a way to change the bam file so that the to-mr script will run? 

Thanks

Meng Zhou

unread,
May 29, 2014, 6:00:28 PM5/29/14
to meth...@googlegroups.com
Hi Leone,

Is is possible to make a minimum subset of your input file so that we can reproduce the error?


Best regards,
Meng


--
You received this message because you are subscribed to the Google Groups "MethPipe and MethBase Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methpipe+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Leone Sophia Hopkins

unread,
May 30, 2014, 1:42:50 AM5/30/14
to meth...@googlegroups.com
Hi Meng,

The file only contains the lambda genome, so it isn't too large to begin with. I've run it twice and gotten the same error. Would you like me to send you the file? 

Thanks,
Leone

Meng Zhou

unread,
May 30, 2014, 1:47:06 AM5/30/14
to meth...@googlegroups.com
Yes, please send to my gmail: mzho...@gmail.com


Best regards,
Meng

Gina Turco

unread,
Jun 2, 2014, 6:24:09 PM6/2/14
to meth...@googlegroups.com
Hi I am getting a similar error running to-mr on a bismark output

terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr  

the command is
to-mr -m bismark -o test.mr test


Can I send a subset as well?

Meng Zhou

unread,
Jun 2, 2014, 6:27:18 PM6/2/14
to meth...@googlegroups.com
Sure.


Best regards,
Meng

Meng Zhou

unread,
Jun 2, 2014, 7:01:25 PM6/2/14
to meth...@googlegroups.com
Hi Gina and other users who had this specific "terminate ... what():  basic_string::substr" error,

This error is caused by the input file name. Currently to-mr determines whether the input file is SAM or BAM based on the file name extension. So please make sure your files are named properly ending with either ".sam" or ".bam". If your input file does not have a dot in the file name, this error occurs. It is a funny error and we will make sure to-mr is "smarter" in later updates.

BTW Gina, it seems that the test file you sent to me is not generated by Bismark, because I saw a "bsmap" in the file. But for now I recommend you not to use -m bsmap because this option has not been fully tested. Please use -m general instead.

To Leone, the error you have seen might be something else, but please also check your command, and send me a test file when you are ready. Thanks.


Best regards,
Meng


On Mon, Jun 2, 2014 at 3:24 PM, Gina Turco <gtur...@gmail.com> wrote:

Gina Turco

unread,
Jun 2, 2014, 7:18:42 PM6/2/14
to meth...@googlegroups.com
thanks works great!
Gina
Graduate Student 
Brady Lab 

Peter Hill

unread,
Oct 20, 2014, 11:59:08 AM10/20/14
to meth...@googlegroups.com
Hi Meng,

I'm getting the same error:

terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create

my files seem properly named:

to-mr -o E10_deduplicated.mr -m bismark E10_deduplicated.bam

Why would this be?

Thanks!
Peter.

Meng Zhou

unread,
Oct 20, 2014, 2:21:48 PM10/20/14
to meth...@googlegroups.com
Hi Peter,

Could you please provide a small testing BAM file so that I can reproduce the error?

Best regards,
Meng

Peter Hill

unread,
Oct 21, 2014, 10:00:40 AM10/21/14
to meth...@googlegroups.com
Hi Meng,

I've sent you the data through a file exchange.

Thanks!
Peter.

Meng Zhou

unread,
Oct 21, 2014, 5:54:57 PM10/21/14
to meth...@googlegroups.com
Hi Peter,

I found that you are using an older version of bismark (v0.7.8), which uses unconventional SAM flag for bisulfite pair-end reads. This incompatible error only exists for bismark version before 0.8.3. I think your data is huge, so re-mapping them might not be a good option. I'll send you some source code files to fix this.

Best regards,
Meng

Meng Zhou

unread,
Oct 21, 2014, 6:39:51 PM10/21/14
to meth...@googlegroups.com
Please replace the file in src/smithlab_cpp/SAM.cpp with the attached file.

Best regards,
Meng
SAM.cpp

Peter Hill

unread,
Oct 25, 2014, 6:56:54 AM10/25/14
to meth...@googlegroups.com
Hi Meng,

I replaced the SAM.cpp file, but now I'm now getting the error: 

Fail to open SAM/BAM file E10_deduplicated.bam

When I run to-mr -o E10.mr -m bismark E10_deduplicated.bam ...

Samtools/0.1.19 is in my PATH so that's not the problem. Thoughts?

Peter.


to-mr -o E10.mr -m bismark E10_deduplicated.bam

Meng Zhou

unread,
Oct 25, 2014, 6:40:15 PM10/25/14
to meth...@googlegroups.com
Hi Peter,

That looked weird; I couldn't reproduce this error. Could you please try the following commands in methpipe directory and run to-mr again?

make clean
make install

Best regards,
Meng

Peter Hill

unread,
Oct 28, 2014, 6:53:05 AM10/28/14
to meth...@googlegroups.com
looks like that solved the problem. Thanks!
Peter.
Reply all
Reply to author
Forward
0 new messages