Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mez
    Junior Member
    • Nov 2011
    • 5

    1000 genomes site BAM Files

    Please,

    I would like anyone who has had experience working with the .bam alignment files from the 1000 genomes site to help me out with this situation. I have been trying for long to get a complete FASTA sequence of the sample DNA from the .bam files for a given genomic region. I had used the samtools view, sort, index as well as pile up commands to get a pile up file and eventually extracted the consensus DNA sequence from the fourth column of the pile up file, creating the FASTA file.

    The problem I am having with this approach, is that the raw DNA sequence seem to be obviously shorter in each case than the DNA sequence from the reference genome, and for different samples I get different DNA sequence length. I do not know if the issue is because of the low coverage sequence approach of the 1000 genomes site, or if I am doing something wrong.

    Thanks and will appreciate any guidance.
  • swbarnes2
    Senior Member
    • May 2008
    • 910

    #2
    You'd think that there woud be an out-of-the-box answer to making fastas from .bams, but there isn't.

    The first thing I see wrong with your approach is that pileup will simply not show any line if it is totally uncovered. Are you padding your fasta with N's when there is no corresponding line in the pileup?

    Older versions of samtools came with a samtools.pl that had a utility to make consensus fastq of pileups. You could try using that. perl scripts are flat text files, you can read them like an ordinary text file.

    Search around seqanswers a bit, I know I've written previously on how to convert a perl script that writes a fastq into one that writes a fasta. It's just a matter of changing a few characters in the script.

    Comment

    • Alex Renwick
      Member
      • Jul 2011
      • 44

      #3
      Originally posted by mez View Post
      ... extracted the consensus DNA sequence from the fourth column of the pile up file, creating the FASTA file.
      ...
      By "fourth column" I suppose you mean "third column", since the fourth column of the pileup format is the count of reads covering the site. See pileup format.

      The sequence you get from the third column is the reference sequence, not a consensus sequence. It will be shorter because sites with no read coverage won't appear.

      See http://samtools.sourceforge.net/mpileup.shtml for instructions on using samtools to generate a consensus sequence:

      Code:
      samtools mpileup -uf ref.fa aln.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq

      Comment

      • nexgengirl
        Member
        • Apr 2010
        • 31

        #4
        Check out this tool:



        It will convert a sam or a bam to a fastq. That would get you at least half way to a fasta file.

        I'm pretty sure there have been other posts on how to convert from fastq to fasta+qual so I would check on seqanswers for more about that.

        Good luck!

        Comment

        • laura
          Senior Member
          • Sep 2008
          • 151

          #5
          If you are after all the sequence for a particular individual from the 1000 genomes project you are much better using our fastq files rather than our bam files

          ftp://ftp.1000genomes.ebi.ac.uk/vol1....sequence_data
          ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/sequence.index

          If you want just the sequence which has been aligned to a particular region then a solution like picards SamtoFastq which has already been suggested would be best

          If you want the reference genome annotated for all the variants in a particular individual then you should look at solutions like



          or

          vcfutils.pl vcf2fq from samtools

          amd our vcf files which you can get from

          ftp://ftp.1000genomes.ebi.ac.uk/vol1...ease/20110521/

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
            by SEQadmin2



            Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
            ...
            07-09-2026, 11:10 AM
          • SEQadmin2
            Cancer Drug Resistance: The Lingering Barrier to Rising Survival
            by SEQadmin2



            Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

            There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
            07-08-2026, 05:17 AM
          • GATTACAT
            Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
            by GATTACAT
            Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
            07-01-2026, 11:43 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 07-13-2026, 10:26 AM
          0 responses
          28 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-09-2026, 10:04 AM
          0 responses
          37 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-08-2026, 10:08 AM
          0 responses
          25 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-07-2026, 11:05 AM
          0 responses
          35 views
          0 reactions
          Last Post SEQadmin2  
          Working...