Hi to all,
I have a fasta file having sequences (similar input file for command line blast program) that I extracted from one of Stacks outputs. I would like to align these sequences to a reference genome and use IGV like visualization tool to check the locations of these sequences. I just wonder is there any program that uses these kind of simple input file for alignment purpose.
Thank you in advance,
Shripathi
2 answers
Blat and gmap are useful general-purpose aligners that are reasonably fast and take fasta as input. If you sequences are not too large and there are not too many of them, blat is available online at the UCSC genome browser site.
gmap indeed allows you to align sequences in FASTA with a reference genome. It can output alignments in SAM format:
# Build reference genome database
gmap_build -D dir/ -d refgenome dir/refgenome.fa
# Alignment
gmap -D dir -d yourgenome -f samse -t 8 yourfasta.fa | samtools view -Shb - | samtools sort - alignment
samtools index aligment.bam
You can then visualize the alignment with IGV
Log in to answer this question.
Bwa seamlessly works with both fasta and fastq.