I did illumina read mapping based on a particular gene sequence (reference sequence) using the following command,

bowtie2-build -f ref_gene.fasta ref_index && bowtie2 -p 4 -N 1 -t -x ref_index -1 genome_R1.fastq -2 genome_R2.fastq -S tal.sam && samtools view -bS tal.sam | samtools sort - -o tal.bam && samtools mpileup -uf ref_gene.fasta tal.bam | bcftools call -c | vcfutils.pl vcf2fq > cns.fastq && seqtk seq -aQ64 -q20 -n N cns.fastq > contig.fasta

It maps the reads according to the reference sequence and yields, exactly same length of aligned/assembled sequences. But, I need obtain the unaligned overlapping read bases at the both end (reverse and forward end) Please see the image for better understanding.

image of the reference gene and the extended read

Is there any way to get the same?

  • 2
    $\begingroup$ You're not going to get vastly different replies here than Biostars or github. $\endgroup$
    – Devon Ryan
    Sep 27, 2019 at 13:17
  • 1
    $\begingroup$ @DevonRyan sniper! $\endgroup$
    – d_kennetz
    Sep 27, 2019 at 21:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.