Can MITObim work on paired end reads?

1,284 views
Skip to first unread message

Ning Zhang

unread,
Nov 9, 2015, 12:07:31 PM11/9/15
to MITObim-users
I do not how to deal with paired-end read data using MITObim, --pair?
Can you give me an example of the command, thanks.
Ning

Chris H

unread,
Nov 9, 2015, 6:40:17 PM11/9/15
to MITObim-users
Hi Ning,
Thanks for your interest in MITObim!

Yes, it can handle paired end data. You will have to prepare the data in interleaved fastq format first. If your reads come in two separate files, like `reads_1.fastq.gz` and `reads_2.fastq.gz`, you could use e.g. this script, like so:
`interleave-fastqgz-MITOBIM.py reads_1.fastq.gz reads_2.fastq.gz > interleaved.fastq`

MIRA (the assembler that MITObim is using) will automatically use the paired-end information in the assemlby process, if the reads come in the right format - you don't have to do a thing about it. Using the `--paired` option will produce readpools that contain all reads as good pairs, even if only one member of the pair was identified as candidate read based on similarity with the reference in the initial baiting step. Apply any of the recipes explained in the tutorials here and simply add the `--pair` option. 

Hope that helps!

cheers,
Christoph

Ning Zhang

unread,
Nov 10, 2015, 9:11:44 AM11/10/15
to MITObim-users
Hi, Christoph:
It helps, thanks a lot.
Ning

Ning Zhang

unread,
Nov 10, 2015, 9:43:43 AM11/10/15
to MITObim-users
Hi, Christoph:
I got an error message when I use this script.
here is my command

./interleave-fastqgz-MITOBIM.py 5_S2_L001_R1_001.fastq.gz 5_S2_L001_R2_001.fastq.gz >interleaved.fastq


here is the error message:


Traceback (most recent call last):

  File "./interleave-fastqgz-MITOBIM.py", line 37, in <module>

    with gzip.open(file1) as f1:

AttributeError: GzipFile instance has no attribute '__exit__'


Do you know what happened?

thanks.

Ning






On Monday, November 9, 2015 at 6:40:17 PM UTC-5, Chris H wrote:

Chris H

unread,
Nov 12, 2015, 8:02:25 AM11/12/15
to MITObim-users
Hi,

I think you might be using an old python version. I modified the interleave script. Hope that will fix the issue - Please download and try again!

cheers,
Christoph

josef.k...@gmail.com

unread,
Dec 19, 2016, 5:00:27 PM12/19/16
to MITObim-users
Hey Christoph,

I got the same error message as Ning (AttributeError: GzipFile instance has no attribute '__exit__'). I am using Python v2.6. Do you know how to change the script?

Cheers,

Josef

Chris H

unread,
Dec 20, 2016, 4:16:20 AM12/20/16
to MITObim-users
Hi Josef,

The script should run with python >= 2.7. If this is not an option the simplest workaround is to decompress the reads beforehand. Not pretty but it will work.

cheers,
Christoph

Peter Teske

unread,
Mar 10, 2017, 4:14:17 AM3/10/17
to MITObim-users
Have you tried the following:

/usr/bin/python interleave-fastqgz-MITOBIM.py xxxxx_R1.fastq xxxxx_R2.fastq > xxxxx_interleaved.fastq

Peter
Reply all
Reply to author
Forward
0 new messages