SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
picard error seq_GA Bioinformatics 2 07-15-2014 04:50 AM
error in picard (SAM validation error) dongshenglulv Bioinformatics 3 07-05-2013 12:58 PM
Picard FixMateInformation error? reeso123 Bioinformatics 5 06-04-2013 12:09 PM
Picard error JohnK Bioinformatics 14 12-14-2012 05:41 AM
Picard rmdup error kapoormanav Illumina/Solexa 2 09-07-2010 01:11 PM

Reply
 
Thread Tools
Old 06-22-2015, 06:27 AM   #1
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 354
Default Picard error [solved]

I am using HSmetrics and getting the below error. I downloaded picard tools from apt-get and installed it in /usr/bin/picard-tools. The hg19.fa was made by using

Code:
wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/chromFa.tar.gz -O - | tar -zxf - and then using cat chr*.fa > hg19.fa to concatenate them into one file
I am not sure what is wrong. Thank you .

Code:
dnascopev@ubuntu:~$ cd "/media/C2F8EFBFF8EFAFB9"
dnascopev@ubuntu:/media/C2F8EFBFF8EFAFB9$ picard-tools CalculateHsMetrics BI=target_regions.bed TI=xgen_targets_sort.bed I=IonXpress_009_150603.bam O=IonXpress_009_150603_epilepsy70.CalculateHSmetrics R=/home/dnascopev/Desktop/hg19_fasta/hg19.fa
ERROR: Unrecognized option: R

Last edited by cmccabe; 06-27-2015 at 04:52 AM.
cmccabe is offline   Reply With Quote
Old 06-22-2015, 06:39 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,049
Default

To me it looks like that hg19.fa you made was not the file that was used for the original alignments. Can you grab the actual file from your Ion software install (which is where that BAM came from?). Otherwise look in the headers of your BAM to see if the chromosome names etc match the file you made.
GenoMax is offline   Reply With Quote
Old 06-22-2015, 06:44 AM   #3
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 354
Default

I will transfer that fasta and try again. Thank you .
cmccabe is offline   Reply With Quote
Old 06-22-2015, 07:27 AM   #4
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 354
Default

I transfered the Ion hg19.fasta and tried using it, but got the same error.

Code:
dnascopev@ubuntu:/media/C2F8EFBFF8EFAFB9$ picard-tools CalculateHsMetrics BI=target_regions.bed TI=xgen_targets_sort.bed I=IonXpress_009_150603.bam O=IonXpress_009_150603_epilepsy70.CalculateHSmetrics R=/home/dnascopev/Desktop/hg19_fasta/hg19.fasta
ERROR: Unrecognized option: R
Thank you .
cmccabe is offline   Reply With Quote
Old 06-22-2015, 07:47 AM   #5
skbrimer
Member
 
Location: OP Kansas

Join Date: Mar 2014
Posts: 53
Default

Quote:
Originally Posted by
[CODE
R=/home/dnascopev/Desktop/hg19_fasta/hg19.fasta
ERROR: Unrecognized option: R [/CODE]
according to the help file there is no option R with this function. I'm pretty new to picard tools so I'm not 100% sure, but maybe put the reference file location before the CalculateHsMetrics function.
skbrimer is offline   Reply With Quote
Old 06-22-2015, 07:52 AM   #6
skbrimer
Member
 
Location: OP Kansas

Join Date: Mar 2014
Posts: 53
Default

or maybe it doesn't need the reference file since it's already mapped to begin with?
skbrimer is offline   Reply With Quote
Old 06-22-2015, 07:57 AM   #7
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,049
Default

That option is/was there with picard-tools Version: 1.88(1394).

Now the latest on github appears to say Release 1.134 (did Broad change the version numbers)?
GenoMax is offline   Reply With Quote
Old 06-22-2015, 08:03 AM   #8
skbrimer
Member
 
Location: OP Kansas

Join Date: Mar 2014
Posts: 53
Default

Quote:
Originally Posted by GenoMax View Post
That option is/was there with picard-tools Version: 1.88(1394).

Now the latest on github appears to say Release 1.134 (did Broad change the version numbers)?
I do not think they changed their numbers. It looks like after 1.88 they started updating 2-3 times per month for the last 2 years.
skbrimer is offline   Reply With Quote
Old 06-22-2015, 08:12 AM   #9
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 354
Default

I tried without the reference file and got Exception in thread "main" java.lang.IllegalStateException and am not sure where or how to include the Reference. Thank you .
cmccabe is offline   Reply With Quote
Old 06-22-2015, 08:21 AM   #10
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,049
Default

@cmccabe: Are you using latest download off github? Latest does not seem to have the "R" option even though the tool description still refers to a "reference": http://broadinstitute.github.io/pica...ulateHsMetrics
GenoMax is offline   Reply With Quote
Old 06-22-2015, 08:22 AM   #11
skbrimer
Member
 
Location: OP Kansas

Join Date: Mar 2014
Posts: 53
Default

Okay, so I was wrong. To get the help file for the command you want it is -H, which does indeed have the R option.

sean@LEN320:~$ java -jar picard-tools-1.134/picard.jar CalculateHsMetrics -H
USAGE: CalculateHsMetrics [options]

Documentation: http://broadinstitute.github.io/pica...ulateHsMetrics

Calculates a set of Hybrid Selection specific metrics from an aligned SAMor BAM file. If a reference sequence is provided, AT/GC dropout metrics will be calculated, and the PER_TARGET_COVERAGE option can be used to output GC and mean coverage information for every target.
Version: 1.134(a7a08c474e4d99346eec7a9956a8fe71943b5d80_1434033355)


Options:

--help
-h Displays options specific to this tool.

--stdhelp
-H Displays options specific to this tool AND options common to all Picard command line
tools.

--version Displays program version.

BAIT_INTERVALS=File
BI=File An interval list file that contains the locations of the baits used. Default value:
null. This option must be specified at least 1 times.

BAIT_SET_NAME=String
N=String Bait set name. If not provided it is inferred from the filename of the bait intervals.
Default value: null.

TARGET_INTERVALS=File
TI=File An interval list file that contains the locations of the targets. Default value: null.
This option must be specified at least 1 times.

INPUT=File
I=File An aligned SAM or BAM file. Required.

OUTPUT=File
O=File The output file to write the metrics to. Required.

METRIC_ACCUMULATION_LEVEL=MetricAccumulationLevel
LEVEL=MetricAccumulationLevel The level(s) at which to accumulate metrics. Default value: [ALL_READS]. This option can
be set to 'null' to clear the default value. Possible values: {ALL_READS, SAMPLE,
LIBRARY, READ_GROUP} This option may be specified 0 or more times. This option can be set
to 'null' to clear the default list.

PER_TARGET_COVERAGE=File An optional file to output per target coverage information to. Default value: null.

TMP_DIR=File Default value: null. This option may be specified 0 or more times.

VERBOSITY=LogLevel Control verbosity of logging. Default value: INFO. This option can be set to 'null' to
clear the default value. Possible values: {ERROR, WARNING, INFO, DEBUG}

QUIET=Boolean Whether to suppress job-summary info on System.err. Default value: false. This option
can be set to 'null' to clear the default value. Possible values: {true, false}

VALIDATION_STRINGENCY=ValidationStringency
Validation stringency for all SAM files read by this program. Setting stringency to
SILENT can improve performance when processing a BAM file in which variable-length data
(read, qualities, tags) do not otherwise need to be decoded. Default value: STRICT. This
option can be set to 'null' to clear the default value. Possible values: {STRICT,
LENIENT, SILENT}

COMPRESSION_LEVEL=Integer Compression level for all compressed files created (e.g. BAM and GELI). Default value:
5. This option can be set to 'null' to clear the default value.

MAX_RECORDS_IN_RAM=Integer When writing SAM files that need to be sorted, this will specify the number of records
stored in RAM before spilling to disk. Increasing this number reduces the number of file
handles needed to sort a SAM file, and increases the amount of RAM needed. Default
value: 500000. This option can be set to 'null' to clear the default value.

CREATE_INDEX=Boolean Whether to create a BAM index when writing a coordinate-sorted BAM file. Default value:
false. This option can be set to 'null' to clear the default value. Possible values:
{true, false}

CREATE_MD5_FILE=Boolean Whether to create an MD5 digest for any BAM or FASTQ files created. Default value:
false. This option can be set to 'null' to clear the default value. Possible values:
{true, false}

REFERENCE_SEQUENCE=File
R=File Reference sequence file. Default value: null.

GA4GH_CLIENT_SECRETS=String Google Genomics API client_secrets.json file path. Default value: client_secrets.json.
This option can be set to 'null' to clear the default value.

OPTIONS_FILE=File File of OPTION_NAME=value pairs. No positional parameters allowed. Unlike command-line
options, unrecognized options are ignored. A single-valued option set in an options file
may be overridden by a subsequent command-line option. A line starting with '#' is
considered a comment. Required.

Last edited by skbrimer; 06-22-2015 at 08:25 AM.
skbrimer is offline   Reply With Quote
Old 06-22-2015, 08:52 AM   #12
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 354
Default

In ubuntu I used:
Code:
 sudo apt-get install picard-tools
Thanks .
cmccabe is offline   Reply With Quote
Old 06-22-2015, 09:10 AM   #13
skbrimer
Member
 
Location: OP Kansas

Join Date: Mar 2014
Posts: 53
Default

what happens if you just use REFERENCE_SEQUENCE instead of R?
skbrimer is offline   Reply With Quote
Old 06-22-2015, 09:18 AM   #14
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 354
Default

I get the same error. Thank you .

I also installed
Code:
 sudo apt-get install r-base
Code:
dnascopev@ubuntu:/media/C2F8EFBFF8EFAFB9$  picard-tools CalculateHsMetrics BI=xgen_probes_sort.bed TI=xgen_targets_sort.bed I=IonXpress_009_150603.bam O=IonXpress_009_150603_epilepsy70.CalculateHSmetrics REFERENCE_SEQUENCE=/home/dnascopev/Desktop/hg19_fasta/hg19.fasta
ERROR: Unrecognized option: REFERENCE_SEQUENCE
cmccabe is offline   Reply With Quote
Old 06-22-2015, 10:27 AM   #15
skbrimer
Member
 
Location: OP Kansas

Join Date: Mar 2014
Posts: 53
Default

This is probably me being new to linux and I'm terrible with adding things to my path, but when I call picard tools I have to use java -jar before all of the command line stuff. Do you have to do that was well?
skbrimer is offline   Reply With Quote
Old 06-22-2015, 10:46 AM   #16
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,049
Default

@cmccabe: Can you run the command without the R option and see if it works? You will not get certain stats (AT/GC dropout metrics) but let us see if you can get the command to work otherwise.

$ picard-tools -v or --version (does that print the version number you are using)?
GenoMax is offline   Reply With Quote
Old 06-22-2015, 11:09 AM   #17
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 354
Default

Here are the results of the 3 things:

Code:
dnascopev@ubuntu:/media/C2F8EFBFF8EFAFB9$ picard-tools --version
picard-tools
Copyright 2010 The Broad Institute
java -jar
Code:
 java -jar picard-tools CalculateHsMetrics BI=xgen_probes_sort.bed TI=xgen_targets_sort.bed I=IonXpress_009_150603.bam O=IonXpress_009_150603_epilepsy70.CalculateHSmetrics REFERENCE_SEQUENCE=/home/dnascopev/Desktop/hg19_fasta/hg19.fasta
Unable to access jarfile picard-tools
without R=
Code:
dnascopev@ubuntu:/media/C2F8EFBFF8EFAFB9$ picard-tools CalculateHsMetrics BI=xgen_probes_sort.bed TI=xgen_targets_sort.bed I=IonXpress_009_150603.bam O=IonXpress_009_150603_epilepsy70.CalculateHSmetrics
[Mon Jun 22 14:04:14 CDT 2015] net.sf.picard.analysis.directed.CalculateHsMetrics BAIT_INTERVALS=xgen_probes_sort.bed TARGET_INTERVALS=xgen_targets_sort.bed INPUT=IonXpress_009_150603.bam OUTPUT=IonXpress_009_150603_epilepsy70.CalculateHSmetrics    TMP_DIR=/tmp/dnascopev VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
[Mon Jun 22 14:04:14 CDT 2015] net.sf.picard.analysis.directed.CalculateHsMetrics done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=61079552
Exception in thread "main" java.lang.IllegalStateException: Interval list file must contain header. 
	at net.sf.picard.util.IntervalList.fromReader(IntervalList.java:176)
	at net.sf.picard.util.IntervalList.fromFile(IntervalList.java:152)
	at net.sf.picard.analysis.directed.HsMetricsCalculator.<init>(HsMetricsCalculator.java:83)
	at net.sf.picard.analysis.directed.CalculateHsMetrics.doWork(CalculateHsMetrics.java:83)
	at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:158)
	at net.sf.picard.analysis.directed.CalculateHsMetrics.main(CalculateHsMetrics.java:68
Thank you .
cmccabe is offline   Reply With Quote
Old 06-22-2015, 11:13 AM   #18
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,049
Default

So we now have a new error to work on

"Interval list file must contain header"

Can you post a few lines from your bed file?
GenoMax is offline   Reply With Quote
Old 06-22-2015, 11:21 AM   #19
cmccabe
Senior Member
 
Location: chicago

Join Date: Jul 2012
Posts: 354
Default

BI=
Code:
chr1	133573	133692
chr1	659937	660056
chr1	809529	809649
TI=
Code:
chr1	955542	955763
chr1	957570	957852
chr1	976034	976270
The bed files are sorted using
Code:
 sort -k1,1 -k2,2g -o out.bed in.bed
, should I not sort them for picard? Thank you .
cmccabe is offline   Reply With Quote
Old 06-22-2015, 11:46 AM   #20
skbrimer
Member
 
Location: OP Kansas

Join Date: Mar 2014
Posts: 53
Default

would you put the out of
Code:
ls /usr/bin/picard-tools
skbrimer 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 01:09 PM.


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