Question: paired reads have different names (bwa-mem)
1
gravatar for AISHA
13 months ago by
AISHA20
Beijing
AISHA20 wrote:

Hi, I am experiencing a problem while running BWA mem on paired end fastq file downloaded from NCBI SRA. When I ran BWA-mem it gives an error like:

[mem_sam_pe] paired reads have different names: "SRR3239806.1.1", "SRR3239806.1.2"

Example Fastq file:

@SRR3239806.1.1 1 length=100 TTGTGTAGGGTGGGTAGGCTCCATGTTTCCCAGCAAAGCTGGAGACATACAGACTACCTGGTGTTACATTTATTTCAGTGCCTCCTGAGTGTCTCTAAAT +SRR3239806.1.1 1 length=100 B@CDDFEFFHFFFI@GHIJGIJJJIJIIJJJGGHHIIIJJJJHIIGEHGIJIIIEGIGGHI@A=AHHFDEFFFFFEDEEECCDDDDD3<@CCCDDAC@CC

@SRR3239806.1.2 1 length=100

@SRR3239806.2.1 2 length=100

@SRR3239806.2.2 2 length=100

(I've just pasted the headers for the sake of brevity.) Can anyone explain how can I fix this error?

next-gen • 1.8k views
ADD COMMENTlink modified 12 months ago by mmfansler160 • written 13 months ago by AISHA20

Is it actually an error or just a warning? Did you download the fastq files or convert them with SRAtools?

ADD REPLYlink written 13 months ago by Devon Ryan80k

Its an error. I downloaded fastq file directly. It was a single file.

ADD REPLYlink written 13 months ago by AISHA20
2
gravatar for mmfansler
12 months ago by
mmfansler160
MSKCC | New York, NY
mmfansler160 wrote:

It appears that when the FASTQ file was dumped from the SRA file, the -I | --readids option was used in fastq-dump. BWA requires that paired reads have completely identical read names, so this option isn't compatible.

You could process the file(s) to remove those appended .(1|2)s,

sed -E "s/^((@|\+)SRR[^.]+\.[^.]+)\.(1|2)/\1/" SRR3239806.fastq > SRR3239806.fixed.fastq

or you could rerun the dump from SRA to FASTQ (which could be just as fast if the SRA is cached):

fastq-dump --split-files SRR3239806

or, if you'd like to keep working with an interleaved file:

fastq-dump --split-spot SRR3239806
ADD COMMENTlink modified 12 weeks ago • written 12 months ago by mmfansler160
1
gravatar for genomax
13 months ago by
genomax49k
United States
genomax49k wrote:

It appears that those reads are interleaved in the file you downloaded.

I suggest you download the fastq files directly from EBI-ENA where you will find the two reads (R1/R2) in separate files.

ADD COMMENTlink written 13 months ago by genomax49k
1

Interleaved files are not a problem for BWA - that's what the -p flag is for.

ADD REPLYlink modified 12 months ago • written 12 months ago by mmfansler160

Yes! I downloaded the interleaved fastq file. Isn't there any method to remove the above-mentioned error in the file?

ADD REPLYlink written 13 months ago by AISHA20

Reads you downloaded are using modified SRA headers (if you used fastq-dump to get the data you should have used the -F option to retrieve original Illumina headers. You could mess with the file you have but I suggest that you get the fastq's from ENA or do a new fastq-dump.

ADD REPLYlink written 13 months ago by genomax49k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1700 users visited in the last hour