This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BWA-mem alignment

Hi!

I'm doing an alignment to a reference genome by using the bwa-mem algorithm but I'm obtaining a bam file in which all the data seems to appear in the Chr1 as I see in IGV and the bam file obtained. The code that I'm using is:

threads=$SLURM_JOB_CPUS_PER_NODE

bwa index ./GRCh37.p13_alignCNVs.fasta

bwa mem -t $threads ./GRCh37.p13_alignCNVs.fasta ./NA12878_1.fastq ./NA12878_2.fastq |
        samtools view -S -b - |   
        samtools sort - -o sample_sorted.bam  
        samtools index sample_sorted.bam 
wgs data genomics

What is the output of grep '>' GRCh37.p13_alignCNVs.fasta?

1 answer

So, your reference file only has one chromosome "chr1", therefore it is not a surprise that all reads are aligned to chr1. So what exactly did you expect that would happen here? Could it be you downloaded an incomplete or wrong reference? What is the analysis goal?

That's true! The goal is to detect CNVs in the whole genome. I guess I downloaded the wrong reference genome, that was a silly mistake. Thanks a lot!

Log in to answer this question.