This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Paired-End Reads and Variant Calling

Dear colleagues,

I have the fastq files of paired end sequences of 42 animals but when I run bwa mem to generate the .sam files i did not get the correct output, it is empty.

bwa mem -M CHR6.fa file_1.fastq file_2.fastq > out_2R.sam.

Can anyone help me?

Thanks in advance

fastq sam bwa

Why don't you also put in the command you used to index CHR6.fa, just to cover all the bases.

the fastq files has only sequences of chromosome 6

bwa index -a bwtsw CHR6.fa  
java -jar picard.jar CreateSequenceDictionary R= CHR6.fa O= CHR6.dict  
samtools faidx CHR6.fa

thanks¡

By the way, it's always a bad idea to align the read on only one chromosome rather than on the whole reference.

The commands run, this is the message that I can see in the screen, but the output file only has three lines

screen output

The image doesn't work. Can't you just cut and paste the output?

sorry, the link to the image:

bwa output

That's an error. Did these fastq come from the sequencer like that or did you do so something to it?

This is a problem with the way your reads are ordered in the two fastq. Both files should have the read same names and in the very same order.

2 answers

Both your previous thread (BBmerge output question) and this one suffer from the same problem: the question leaves out important information. In both questions, the error probably arose from a previous step in your workflow (processing of the raw fastq files), but as you didn't provide details, the errors were not easily found - and still haven't been. You will have to describe in detail - providing all commands - how the fastq files have been processed so far. Also, stating your final goals may help - for example, in the other thread, it was pointed out merging reads is not necessary for calling SNPs.

You said you are a beginner, so, for the time being, the best course of action would be to follow one tutorial, from start to end. Try to find a tutorial which clearly states the versions of the programs being used, then you can use the same versions. Of course, it would be better if the tutorial is recent. You can certainly read several tutorials, but don't mix commands from them at first. If you do so, there will be plenty of additional hurdles along the way, such as different tutorials using different versions of the same programs, with incompatible command-line formats between these versions.

sorry, the link to the image:

https://i.ibb.co/ZddcbFS/Captura.jpg

Log in to answer this question.