Entering edit mode
8.5 years ago
Wet&DryImmunology
▴
240
Hi, I was trying to use bamTobw to convert bam to bigwig file. The bash file had an issue when trying to convert bedgraph into bigwig (first, bash file converts bam into bedGraph, then converted bedGraph into bw files.
...
Convert DP_Jun_trimmed.sorted.bedgraph to DP_Jun_trimmed.sorted.bw
bedGraphToBigWig DP_Jun_trimmed.sorted.bedgraph chrom_sizes.tmp DP_Jun_trimmed.sorted.bw
~/Tool/bamTobw.sh: line 61: bedGraphToBigWig: command not found
...
it seemed that the command bedGraphToBigWig was missing. and I found this command belongs to "UCSC utilities" mentioned in the requirement of bamTobw. so I downloaded from the web, put it in the same directory with bamtobw.sh file make it executable:
chmod +x bedGraphToBigWig
set the PATH of bedGraphToBigWig
PATH=$PATH:$HOME/Tool/bedGraphToBigWig:$PATH
source the .bash_profile still I had the same issue.
Does anyone has any idea what went wrong? Thanks!
You could just use
bamCoverage
from deepTools, it's rather more heavily used and therefore a bit more likely to work.@Devon Ryan, Thanks! I tried to tweak the code clumsily, but it seems that it did not work out.
I guess I could just use bamCoverage as command to convert the file one by one. but if could you please kindly let me know if minor tweaks could be made in order for the bamTobw.sh to work?
I'd never even heard of bamTobw before you posted it, so I can't comment on what might need to be tweaked.
@Devon Ryan. Thanks for you editing and patient reply! I think I am fine with using bamCoverage as command line at this moment.
@Devon Ryan. I just realized that bamCoverage could DIRECTLLY convert bam into bw. Thanks!
I too never head of it. the pipeline I heard about bigwig generation from bam files involving
bedGraphToBigWig
involves bedgraph generation withbedtools
: