SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem for running ANNOVAR Jane M Bioinformatics 23 04-17-2014 06:44 AM
Running problem with cuffdiff john_nl Bioinformatics 2 02-16-2012 11:21 AM
problem with running MAQ seq_lover Bioinformatics 0 10-30-2011 09:31 PM
cufflinks running problem camelbbs Bioinformatics 6 07-14-2011 01:11 AM
problem running TopHat anecsulea Bioinformatics 1 03-28-2011 03:47 AM

Reply
 
Thread Tools
Old 07-06-2012, 12:19 AM   #1
Balat
Member
 
Location: Australia

Join Date: May 2010
Posts: 36
Default 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 is offline   Reply With Quote
Old 07-09-2012, 03:33 AM   #2
Balat
Member
 
Location: Australia

Join Date: May 2010
Posts: 36
Default

Can any one help with this?
Balat is offline   Reply With Quote
Old 07-09-2012, 08:36 AM   #3
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

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:

Quote:
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.
swbarnes2 is offline   Reply With Quote
Old 07-09-2012, 05:24 PM   #4
Balat
Member
 
Location: Australia

Join Date: May 2010
Posts: 36
Default

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
File Type: gz MET_1000_to_5000.mpileup.gz (272.6 KB, 9 views)
Balat is offline   Reply With Quote
Old 07-09-2012, 11:11 PM   #5
Balat
Member
 
Location: Australia

Join Date: May 2010
Posts: 36
Default

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.
Balat is offline   Reply With Quote
Old 11-11-2014, 03:38 AM   #6
aniele_leao
Junior Member
 
Location: Brazil

Join Date: Nov 2014
Posts: 4
Default

Quote:
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!
aniele_leao is offline   Reply With Quote
Old 11-11-2014, 03:56 AM   #7
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,060
Default

Quote:
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.
GenoMax is offline   Reply With Quote
Old 11-11-2014, 09:39 AM   #8
aniele_leao
Junior Member
 
Location: Brazil

Join Date: Nov 2014
Posts: 4
Default

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.
aniele_leao is offline   Reply With Quote
Old 11-11-2014, 09:44 AM   #9
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,060
Default

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?
GenoMax is offline   Reply With Quote
Old 11-11-2014, 09:56 AM   #10
aniele_leao
Junior Member
 
Location: Brazil

Join Date: Nov 2014
Posts: 4
Default

Quote:
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.
aniele_leao is offline   Reply With Quote
Old 11-11-2014, 10:04 AM   #11
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,060
Default

What aligner did you use to generate the bam files?
GenoMax is offline   Reply With Quote
Old 11-11-2014, 10:11 AM   #12
aniele_leao
Junior Member
 
Location: Brazil

Join Date: Nov 2014
Posts: 4
Default

Bowtie 1.1.1
aniele_leao is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 03:27 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO