Question: run picard on all bam files in directory
0
gravatar for bioguy24
4.3 years ago by
bioguy24190
Chicago
bioguy24190 wrote:

I am trying to run a bash loop on all bam files in a directory and having a bit of trouble.  The bash so far as well as the individual picard command is below.  Thank you :).

Bash loop so far

for f in /home/cmccabe/Desktop/NGS/pool_I_090215/*.bam ; do
bname=`basename $f`
pref=${bname%%.bam}
java -jar /home/cmccabe/Desktop/NGS/picard-tools-1.139/picard.jar CalculateHsMetrics BI=/home/cmccabe/Desktop/NGS/bed/sam_sorted_unix_5column_xgen_probes.bed TI=/home/cmccabe/Desktop/NGS/bed/sam_sorted_unix_5column_xgen_targets.bed I=/$f O=/home/cmccabe/Desktop/NGS/pool_I_090215/${pref}_all_IDT.CalculateHSmetrics
done

If the bam files were run individually here is the command

java -jar /home/cmccabe/Desktop/NGS/picard-tools-1.139/picard.jar CalculateHsMetrics BI=/home/cmccabe/Desktop/NGS/bed/sam_sorted_unix_5column_xgen_probes.bed TI=/home/cmccabe/Desktop/NGS/bed/sam_sorted_unix_5column_xgen_targets.bed I=/home/cmccabe/Desktop/NGS/pool_II_090115/IonXpress_015_150901_newheader.bam  O=/home/cmccabe/Desktop/NGS/pool_II_090115/IonXpress_015_150901_all_IDT.CalculateHSmetrics

 

bam picard ngs • 1.8k views
ADD COMMENTlink modified 4.3 years ago by Dan D7.0k • written 4.3 years ago by bioguy24190

what is the problem ? what is the question ?

ADD REPLYlink written 4.3 years ago by Pierre Lindenbaum125k

What error message are you getting?

ADD REPLYlink written 4.3 years ago by Alex Reynolds29k

Are you sharing this as a useful tip, cmccabe ?

ADD REPLYlink written 4.3 years ago by RamRS25k
0
gravatar for Dan D
4.3 years ago by
Dan D7.0k
Tennessee
Dan D7.0k wrote:

Some of the problems I see:

  • You're specifying parameters in an abbreviated fashion. TI should be TARGET_INTERVALS, for example.
  • The tool doesn't use BED format for the intervals files. It uses its own interval list format.
  • The output for each sample is being written to the same output file. That means you'll be overwriting it each time.

You should at minimum clearly state a question/problem  and provide any error output that you obtain from the tool.

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by Dan D7.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 884 users visited in the last hour