Convert alignment in Fasta/Clustal format to SAM/BAM file
1
0
Entering edit mode
9.0 years ago
Louis Kok ▴ 30

I have multiple sequence alignments in Fasta/Clustal format generated from Sanger sequences. I would like to convert them to SAM or BAM files so that I can proceed to variant calling step. Can I know if there is any method or tool to do this ? Thanks.

SAM BAM Clustal alignment • 7.3k views
ADD COMMENT
1
Entering edit mode

Do you have a representative sequence of your MSA which could be used as reference.fasta ? So that SAM header can be created and then sam records.

ADD REPLY
4
Entering edit mode
9.0 years ago

I quickly wrote a tool to convert CLUSTAL to SAM. See https://github.com/lindenb/jvarkit/wiki/Biostar139647

$ curl -sL "https://raw.githubusercontent.com/suryasaha/Pred_cutoff/60a6f980c9940dfb6e381c5394918f27cb14564f/data/Xylella-RpoH.aln" |\
  java -jar dist-1.128/biostar139647.jar

@HD VN:1.4  SO:unsorted
@SQ SN:chrUn    LN:42
@PG ID:0    VN:3a0c4ccb05e7492382e00328ac60951f215d9400 CL:(empty)  PN:Biostar139647
1   0   chrUn   1   60  42M *   0   0   CATACTTGGTCATCGGTCGTGTCCTTGAAAGTGACTTGTTAA  *
2   0   chrUn   1   60  42M *   0   0   TCTCTGAACCCCCTTGAAACCCCTACACTCAGCCATATATGC  *
3   0   chrUn   1   60  42M *   0   0   TACCTTCGGGTCCTTGAAAATAGCGTCGCCGTGCTTATCTGT  *
4   0   chrUn   1   60  5M2D35M *   0   0   TTGACAGCCGCTTGAGCAGGCGTCGGTCATCCCCACATTC    *
5   0   chrUn   1   60  18M1D9M1D13M    *   0   0   ATGCCTGGGTGGCTTGAAAGCTGGCGGCTTGCCCACATAC    *
6   0   chrUn   1   60  20M1D21M    *   0   0   TCAGTTTTATCGCTTGATATTCACTGAGACTGGCCACACAT   *
ADD COMMENT
0
Entering edit mode

Simply awesome. Would it effect SNP calling if we replace the '-' with N's and make 42M for all sequences ?

ADD REPLY

Login before adding your answer.

Traffic: 2640 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