Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #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


    • #3
      Thank you blancha!

      That completely solved my problem!

      Thank you for the lesson.

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Recent Advances in Sequencing Analysis Tools
        by seqadmin


        The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
        05-06-2024, 07:48 AM
      • seqadmin
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin




        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
        04-22-2024, 07:01 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Today, 07:03 AM
      0 responses
      9 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-10-2024, 06:35 AM
      0 responses
      27 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-09-2024, 02:46 PM
      0 responses
      35 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-07-2024, 06:57 AM
      0 responses
      30 views
      0 likes
      Last Post seqadmin  
      Working...
      X