I am trying to perform reference-based assembly. Most of the tutorials teach how to create a bam file and view alignemnts in IGV or Tablet. But, I want a assembled genome sequence in fasta format. How can I do that ? Is there any tool or linux syntax available for this purpose ?
1 Answer
A few years ago I used AlignGraph (paper and code) for a task like this. I gave AlignGraph my raw reads, so I'm not sure if it accepts SAM/BAM input or if you have to go back to the original Fastq reads.
I'm not sure if any related/improved tools have been published since AlignGraph. Internet searches for "reference-guided assembly" return mostly transcriptome assembly tools. It might be worth looking for articles that cite the AlignGraph paper.
-
$\begingroup$ It seems like AlignGraph takes reads in fasta format. Does it accept fastq format ? What tool do you use to convert fastq to fasta format ? $\endgroup$ Apr 11, 2019 at 1:40
-
$\begingroup$
cat reads.fastq | paste - - - - | cut -f 1-2 | sed 's/^@/>/' | tr '\t' '\n' > reads.fasta
. You can replacecat
withgunzip -c
if your Fastqs are compressed. $\endgroup$ Apr 11, 2019 at 13:06