Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • skbrimer
    Member
    • Mar 2014
    • 55

    Samtools 0.1.19, Unbuntu 14.04, problem getting a consensus

    Hello all,

    I'm having trouble using samtools to get a consensus of a small viral genome and I'm fairly certian its user error. I am very new to all of this however I have not found my issue in the forum so here goes. If someone has posted this answer before and I didn't do a good enough job searching I would be very appreicative if you could link the response to this post.

    I'm using mpileup to extract a consensus with the command listed in the documentation

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

    (with my files in the places of ref.fa and aln.bam)

    and I get "vcfutils.pl command not found" error.

    I did some digging and found a post saying add perl to the command line before vcfutils

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

    and now I get "Can't open perl script "vcfutils.pl": No such file or directory" error.

    I did some more digging and found a post from vcftools that says to use cpan, which I did and it ran fine, no errors and then re-ran the code with "perl" in and out of the line and I still get the same errors.

    Can anyone think of a package that I missed or has someone defeated this problem and can help me with some insight?
  • blancha
    Senior Member
    • May 2013
    • 367

    #2
    It's simple.
    The folder in which vcfutils.pl is located is not in your path.
    Just add the folder to your path, or, even simpler, just specify the full path to the vcfutils.pl file.
    It's in the bcftools folder in the samtools folder, incidentally
    E.g. samtools-0.1.19/bcftools/vcfutils.pl

    Here is a simple demonstration on my computer.
    You'll need to change the path to the samtools folder on your computer.
    You can just type the following command to find the location of the samtools folder.
    which samtools

    ---

    [blancha@lg-1r17-n01 ~]$ vcfutils.pl
    -bash: vcfutils.pl: command not found
    [blancha@lg-1r17-n01 ~]$ /sb/software/areas/ircm/tools/samtools-0.1.19/bcftools/vcfutils.pl

    Usage: vcfutils.pl <command> [<arguments>]

    Command: subsam get a subset of samples
    listsam list the samples
    fillac fill the allele count field
    qstats SNP stats stratified by QUAL

    hapmap2vcf convert the hapmap format to VCF
    ucscsnp2vcf convert UCSC SNP SQL dump to VCF

    varFilter filtering short variants (*)
    vcf2fq VCF->fastq (**)

    Notes: Commands with description endting with (*) may need bcftools
    specific annotations.

    Comment

    • skbrimer
      Member
      • Mar 2014
      • 55

      #3
      Thank you blancha!

      That completely solved my problem!

      Thank you for the lesson.

      Comment

      Latest Articles

      Collapse

      • 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
        ...
        Yesterday, 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
      • 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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Yesterday, 11:10 AM
      0 responses
      8 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-13-2026, 10:26 AM
      0 responses
      30 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-09-2026, 10:04 AM
      0 responses
      39 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-08-2026, 10:08 AM
      0 responses
      25 views
      0 reactions
      Last Post SEQadmin2  
      Working...