Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fedster
    Junior Member
    • Mar 2012
    • 5

    #1

    saving samtools mpileup output from a cluster

    Hi,

    I am trying to use bwa and samtools to see if in the CEU transcriptome there are multiple splice variants of a couple of genes.

    I got the CEU transcriptome from here:



    (I used the fastq files), and I went on to use bwa to

    1) align the fastq reads to my reference file with the possible splices
    2) creating a sam file from (1)

    Now I have transformed the sam files in bam files, and additionally sorted and indexed them.

    What I want to do now is the following: see a (m)pileup of my reference splices against the bam files (161 bam files in total).

    My problem is that I am running everything on a cluster, so I cannot run samtools mpileup to give me an interactive view of the alignment.

    What I'd like to do is to get out of samtools some output text file that tells me, for every bam file, if there is anything aligning to my splices, and some sort of read depth/other quality score/p-value/whatever.

    Any idea on how to do that? I am running out of ideas (I self taught bwa and samtools in the last 3 days, so I feel I am running out of my intuition).
  • Heisman
    Senior Member
    • Dec 2010
    • 534

    #2
    Originally posted by Fedster View Post
    Hi,

    I am trying to use bwa and samtools to see if in the CEU transcriptome there are multiple splice variants of a couple of genes.

    I got the CEU transcriptome from here:



    (I used the fastq files), and I went on to use bwa to

    1) align the fastq reads to my reference file with the possible splices
    2) creating a sam file from (1)

    Now I have transformed the sam files in bam files, and additionally sorted and indexed them.

    What I want to do now is the following: see a (m)pileup of my reference splices against the bam files (161 bam files in total).

    My problem is that I am running everything on a cluster, so I cannot run samtools mpileup to give me an interactive view of the alignment.

    What I'd like to do is to get out of samtools some output text file that tells me, for every bam file, if there is anything aligning to my splices, and some sort of read depth/other quality score/p-value/whatever.

    Any idea on how to do that? I am running out of ideas (I self taught bwa and samtools in the last 3 days, so I feel I am running out of my intuition).
    You can generate a consensus like this:

    Code:
    /samtools-0.1.18/samtools/ mpileup -q 5 -Q 15 -l [Interval_File] -uABf [reference_sequence.fa] [aligned_file.bam] | /samtools-0.1.18/bcftools/bcftools view -bcg - > [intermediate_file.bcf] &
    
    /samtools-0.1.18/bcftools/bcftools view [intermediate_file.bcf] > [consensus.txt]
    Where your [Interval_File] must be in a format where positions are denoted as:

    chr1 3301721
    chr1 3313108
    chr1 3319339

    and intervals are denoted as:

    chr1 2985720 2985880
    chr1 3102667 3103058
    chr1 3160629 3160721

    Comment

    • Fedster
      Junior Member
      • Mar 2012
      • 5

      #3
      Originally posted by Heisman View Post
      Where your [Interval_File] must be in a format where positions are denoted as:

      chr1 3301721
      chr1 3313108
      chr1 3319339

      and intervals are denoted as:

      chr1 2985720 2985880
      chr1 3102667 3103058
      chr1 3160629 3160721
      Excellent thanks! Just a quick question: I have two genes only, but 15 possible splices in total. Should my interval file be

      chr6 3301721
      chr19 3301721
      chr6 2985720 2985880
      chr19 2985720 2985880

      (the positions/intervals I just used are random), or have a position/interval for each splice?

      many thanks!

      Comment

      • Heisman
        Senior Member
        • Dec 2010
        • 534

        #4
        Originally posted by Fedster View Post
        Excellent thanks! Just a quick question: I have two genes only, but 15 possible splices in total. Should my interval file be

        chr6 3301721
        chr19 3301721
        chr6 2985720 2985880
        chr19 2985720 2985880

        (the positions/intervals I just used are random), or have a position/interval for each splice?

        many thanks!
        You can do either; doing one for each splice site region would be yield a smaller output file that would be a lot easier to look through visually.

        Comment

        • Fedster
          Junior Member
          • Mar 2012
          • 5

          #5
          Originally posted by Heisman View Post
          You can do either; doing one for each splice site region would be yield a smaller output file that would be a lot easier to look through visually.
          Thanks a lot! final questions: do I need to change the suffix of my fats file to.fa, and can I run mpileup on oll the bam files at once (I just want to know if, as a population, the CEU show more than one possible splice, I don't care for any specific individual).

          Again, amy thanks!

          Comment

          • Heisman
            Senior Member
            • Dec 2010
            • 534

            #6
            Originally posted by Fedster View Post
            Thanks a lot! final questions: do I need to change the suffix of my fats file to.fa, and can I run mpileup on oll the bam files at once (I just want to know if, as a population, the CEU show more than one possible splice, I don't care for any specific individual).

            Again, amy thanks!
            You don't need to change the suffix of your files.

            You can specify multiple bam files, see this: http://samtools.sourceforge.net/samtools.shtml

            Alternatively, you could merge all of the bam files together and then run mpileup on the merged bam file. I don't know if one would be faster than the other.

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
              by SEQadmin2



              CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

              Despite this, “CRISPR helped turn genome editing from a specialized technique into
              ...
              07-31-2026, 11:01 AM
            • SEQadmin2
              Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
              by SEQadmin2


              Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

              The systematic characterization of the human proteome has
              ...
              07-20-2026, 11:48 AM
            • 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

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 08-03-2026, 10:13 AM
            0 responses
            16 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-31-2026, 02:55 AM
            0 responses
            32 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-24-2026, 12:17 PM
            0 responses
            23 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-23-2026, 11:41 AM
            0 responses
            21 views
            0 reactions
            Last Post SEQadmin2  
            Working...