Seqanswers Leaderboard Ad

Collapse

Announcement

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

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

  • #2
    Can any one help with this?

    Comment


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


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


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


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


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


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


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


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


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

                      Comment


                      • #12
                        Bowtie 1.1.1

                        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
                        25 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 04-10-2024, 10:19 PM
                        0 responses
                        28 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 04-10-2024, 09:21 AM
                        0 responses
                        24 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 04-04-2024, 09:00 AM
                        0 responses
                        52 views
                        0 likes
                        Last Post seqadmin  
                        Working...
                        X