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.
Is there any way to get the same?