Question: Convert alignment in Fasta/Clustal format to SAM/BAM file
0
gravatar for Louis Kok
5.3 years ago by
Louis Kok20
Singapore
Louis Kok20 wrote:

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. 

bam sam alignment clustal • 4.6k views
ADD COMMENTlink modified 5.3 years ago by Pierre Lindenbaum129k • written 5.3 years ago by Louis Kok20
1

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 REPLYlink modified 5.3 years ago • written 5.3 years ago by geek_y11k
3
gravatar for Pierre Lindenbaum
5.3 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum129k wrote:

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 COMMENTlink modified 5.3 years ago • written 5.3 years ago by Pierre Lindenbaum129k

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

ADD REPLYlink written 5.3 years ago by geek_y11k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1341 users visited in the last hour