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
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM
      • seqadmin
        Strategies for Sequencing Challenging Samples
        by seqadmin


        Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
        03-22-2024, 06:39 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      30 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      32 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      28 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-04-2024, 09:00 AM
      0 responses
      53 views
      0 likes
      Last Post seqadmin  
      Working...
      X