Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Balat
    Member
    • May 2010
    • 36

    #1

    Problem running vcfutils.pl

    Hi,
    I have done a re-sequencing experiment to identify snps from candidate genes. I want to get a consensus sequence using BAM files generated by mapping reads with BWA. Ultimately I want to use the consensus fasta file in bedtools to get flanking sequences of SNPs. I have followed the commands suggested in the samtools help pages. These are the commands that I used for getting consensus fastq file.

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

    I got the following message from vcfutils.pl and the output file contained mainly 'n's.

    Use of uninitialized value $q in numeric lt (<) at /usr/bin/vcfutils.pl line 508, <> line 51404.
    Use of uninitialized value $q in addition (+) at /usr/bin/vcfutils.pl line 518, <> line 51404.


    Could any one please help me with this.
  • Balat
    Member
    • May 2010
    • 36

    #2
    Can any one help with this?

    Comment

    • swbarnes2
      Senior Member
      • May 2008
      • 910

      #3
      I think you are going to have to make at least part of the mpileup file, and examine it to see if you can eyeball the problem.

      Just looking at the perl script itself:

      my ($b, $q);
      $q = $1 if ($t[7] =~ /FQ=(-?[\d\.]+)/);
      if ($q < 0) { ...
      So there's a line where the FQ regex is failing. That's what's causing the problem.

      Comment

      • Balat
        Member
        • May 2010
        • 36

        #4
        Hi swbarnes2,
        Thank you. I can't see much of a problem in mpileup. I have attached a short mpileup file generated from a high coverage region. Could you see any problem?
        Attached Files

        Comment

        • Balat
          Member
          • May 2010
          • 36

          #5
          I have tested with the older version of samtools and it seems to generate the fastq file from pileup file.

          This is the pipe I used as suggested in the earlier version of help pages.

          samtools pileup -cf ref.fa aln.bam | samtools.pl pileup2fq -D100 > cns.fastq

          I am not sure why the mpileup is failing to get the fastq file.

          Comment

          • aniele_leao
            Junior Member
            • Nov 2014
            • 4

            #6
            Originally posted by Balat View Post
            I have tested with the older version of samtools and it seems to generate the fastq file from pileup file.

            This is the pipe I used as suggested in the earlier version of help pages.

            samtools pileup -cf ref.fa aln.bam | samtools.pl pileup2fq -D100 > cns.fastq

            I am not sure why the mpileup is failing to get the fastq file.
            Hello,
            I have the same problem here, but in line 544, <> line 73.
            I tried samtools pileup -cf ref.fa aln.bam | samtools.pl pileup2fq -D100 > cns.fastq
            But didn't work either. Do You have any suggestions?

            Thank you so much!

            Comment

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

              #7
              Originally posted by aniele_leao View Post
              Hello,
              I have the same problem here, but in line 544, <> line 73.
              I tried samtools pileup -cf ref.fa aln.bam | samtools.pl pileup2fq -D100 > cns.fastq
              But didn't work either. Do You have any suggestions?

              Thank you so much!
              What version of samtools are you using? For samtools (0.1.19) try: http://samtools.sourceforge.net/mpileup.shtml. If you are using Samtools/Bcftools v.1.1 then the syntax is slightly different.

              Comment

              • aniele_leao
                Junior Member
                • Nov 2014
                • 4

                #8
                I'm using version 0.1.19 and tried the command samtools mpileup -uf ref.fa aln.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq
                Like in the website, but with no success.

                Comment

                • GenoMax
                  Senior Member
                  • Feb 2008
                  • 7142

                  #9
                  Just to make sure .. you are replacing dummy filenames (ref.fa/aln.bam) with real data when you are running this command?

                  If you have done that what "error" do you see?

                  Comment

                  • aniele_leao
                    Junior Member
                    • Nov 2014
                    • 4

                    #10
                    Originally posted by GenoMax View Post
                    Just to make sure .. you are replacing dummy filenames (ref.fa/aln.bam) with real data when you are running this command?

                    If you have done that what "error" do you see?
                    Yes
                    This is what appear when I give the command
                    [mpileup] 1 samples in 1 input files
                    <mpileup> Set max per-file depth to 8000
                    [afs] 0:0.000 1:0.000 2:0.000
                    Use of uninitialized value in length at /usr/local/bin/vcfutils.pl line 544, <> line 73.
                    Use of uninitialized value in length at /usr/local/bin/vcfutils.pl line 544, <> line 73.

                    Comment

                    • GenoMax
                      Senior Member
                      • Feb 2008
                      • 7142

                      #11
                      What aligner did you use to generate the bam files?

                      Comment

                      • aniele_leao
                        Junior Member
                        • Nov 2014
                        • 4

                        #12
                        Bowtie 1.1.1

                        Comment

                        Latest Articles

                        Collapse

                        • SEQadmin2
                          Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                          by SEQadmin2



                          CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                          Despite this, “CRISPR helped turn genome editing from a specialized technique into
                          ...
                          Yesterday, 11:01 AM
                        • 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
                          ...
                          07-20-2026, 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

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by SEQadmin2, Yesterday, 02:55 AM
                        0 responses
                        9 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 07-24-2026, 12:17 PM
                        0 responses
                        12 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 07-23-2026, 11:41 AM
                        0 responses
                        12 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 07-20-2026, 11:10 AM
                        0 responses
                        24 views
                        0 reactions
                        Last Post SEQadmin2  
                        Working...