Unconfigured Ad

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

    #1

    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
        Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
        by SEQadmin2



        Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

        Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
        ...
        10-14-2026, 09:55 AM
      • SEQadmin2
        New Genomics Technologies Take Aim at Long-Standing Limits
        by SEQadmin2


        Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

        We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
        ...
        09-28-2026, 10:25 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 10-22-2026, 11:13 AM
      0 responses
      33 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 10:48 AM
      0 responses
      23 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-15-2026, 10:52 AM
      0 responses
      41 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-14-2026, 05:39 AM
      0 responses
      45 views
      0 reactions
      Last Post SEQadmin2  
      Working...