This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Fasta File To Sam Conversion

Hi,

Is it possible to convert a fasta file to sam/bam format using galaxy OR Sam tools in MAC ?

And how can i call SNP's using samtools. ?

OR

Is is possible to call SNP's using Blast 2.2.25 (Stand Alone Blast)

Thank you Teja

fasta sam format conversion

Are you working on NGS data ? Do you have fastq files ? FASTA file is a simple format with a header and a sequence. For generating SAM format you need a FASTQ file see: samtools.sourceforge.net/SAM1.pdf For BAM format specifications: see section 3 of the same file.

When I use "reformat.sh in=your.fa out=your.sam". I am geting the error as "Error: Could not find or load main class jgi.ReformatReads". Please help me to rectify this error. Thanks in advance.

Are you running this on windows? If so you will need to run

java -cp /path/to/current jgi.ReformatReads in=reads.fq out=mapped.sam

...where /path/to/current is the location of the 'current' directory.

3 answers

FASTA is a sequence representation format, SAM is a sequence alignment format, it makes little sense to transform a FASTA to SAM format, it would mean that all the aligment columns would be empty.

I suspect your intent is different.

Istvan Albert and yet here I am looking for a solution. Also large sequencing centers are now delivering unaligned bam files. It's not sane, but so it goes.

Since you asked: reformat.sh from BBMap. reformat.sh in=your.fa out=your.sam (if you have samtools available in PATH, then you could write bam files directly).

"FASTA is a sequence representation format"

FASTA is used both for unaligned and aligned sequence representation.

Wasn't the FASTA format derived from the FAST-A (FAST-P) alignment algorithm?

Is it possible to convert a fasta file to sam/bam format using galaxy OR Sam tools in MAC ?

No, (or if so that makes little sense, see Istvan's answer) but you can run an alignment program to align the sequences to a reference sequence. e.g. blat (to convert blat output see here), lastz or SHRiMP. This has been also answered here.

And how can i call SNP's using samtools. ?

samtools mpileup

and look here

Is is possible to call SNP's using Blast 2.2.25 (Stand Alone Blast)

No, that makes no sense to me.

Log in to answer this question.