Fasta File To Sam Conversion
3
1
Entering edit mode
12.9 years ago

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 • 20k views
ADD COMMENT
2
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
10
Entering edit mode
12.9 years ago

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.

ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
3
Entering edit mode

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).

ADD REPLY
4
Entering edit mode
12.1 years ago
Rrr ▴ 40

"FASTA is a sequence representation format"

FASTA is used both for unaligned and aligned sequence representation.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

See this thread for an interesting historical perspective by Bill Pearson on Fasta: Was FASTA ever popular?

ADD REPLY
3
Entering edit mode
12.9 years ago
Michael 54k

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.

ADD COMMENT

Login before adding your answer.

Traffic: 1552 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6