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

      • kinpict.com
        Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
        by kinpict.com
        The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
        Today, 06:37 PM
      • SEQadmin2
        16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
        by SEQadmin2





        NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
        10-30-2026, 06:46 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 11-12-2026, 07:59 AM
      0 responses
      28 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 11-05-2026, 09:25 AM
      0 responses
      35 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 11-03-2026, 11:54 AM
      2 responses
      56 views
      0 reactions
      Last Post kinpict.com  
      Started by SEQadmin2, 10-28-2026, 09:57 AM
      0 responses
      175 views
      0 reactions
      Last Post SEQadmin2  
      Working...