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

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

<p>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. </p>

<p><a href="https://i.sstatic.net/IsJOl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IsJOl.png" alt="image of the reference gene and the extended read"></a></p>

<p>Is there any way to get the same?</p>

CC BY-SA 4.0
2019-09-27T13:17:36.860Z
You're not going to get vastly different replies here than [Biostars](https://www.biostars.org/p/400132/) or [github](https://github.com/dpryan79/SE-MEI/issues/5).
Devon Ryan
CC BY-SA 4.0
2019-09-27T21:42:16.793Z
@DevonRyan sniper!
d_kennetz
<sam><read-mapping><assembly><reads>
How to obtain the extended unaligned bases of the read in reference based genome assembly?
# How to obtain the extended unaligned bases of the read in reference based genome assembly?

(Asked by: username_0 on 2019-09-27)

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?

**Tags:** sam, read-mapping, assembly, reads
> **Comments:**
> **username_1**: You're not going to get vastly different replies here than [Biostars](https://www.biostars.org/p/400132/) or [github](https://github.com/dpryan79/SE-MEI/issues/5).  
> **username_2**: @DevonRyan sniper!  

---

## 0 answers

