grape-nf icon indicating copy to clipboard operation
grape-nf copied to clipboard

bigWig (update for bedGraphToBigWig ~v357 and later)

Open karl616 opened this issue 7 years ago • 6 comments

  • make sure the bedGraph files are sorted prior to bigWig conversion

karl616 avatar Mar 28 '18 10:03 karl616

I had trouble running the current version of the pipeline with a reference genome with chromosomes sorted as [chr1, chr2, chr3, ..., chr10, ... ] instead of [chr1, chr10, chr2,... ].

These changes ensures that the bedGraph files are sorted prior to running bedGraphToBigWig.

One thing I'm unsure about though is if the bedGraph files are needed later in the pipeline and if resorting the files would disrupt something.

karl616 avatar Mar 28 '18 10:03 karl616

Hi Karl,

apologies for the late reply and thanks for the contribution.

What kind of problems did you get? We have run the pipeline several times with references sorted by genomic position (as you wrote: chr1, chr2, ...) but never had problems.

Could you please share log files and/or the process error files with any relevant information?

Best, Emilio

emi80 avatar Mar 29 '18 10:03 emi80

Hi Emilo, of course...

The pipeline stops during the bigwig step. This is the command log:

command.log

The script runs if I sort the bedGraph files as suggested by these commits. If you say that it works for you, I will see if I can find some other reason this happens. One thing I can think of directly would be that I create the STAR reference before starting the pipeline. I also have another version of bedGraphToBigWig (v357)... I'll look into it.

karl616 avatar Mar 29 '18 11:03 karl616

Looks like there is an embarrassing mistake behind this... it occurred when testing to set the pipeline up with on BioConda and I didn't run the pipeline as per ususal... the copy-paste-demon added the --wig-ref-prefix - flag. I'm rerunning to make sure, but I'm convinced that that's it... I'll close this down when I confirmed it...

karl616 avatar Mar 29 '18 13:03 karl616

Ok, no problem.

emi80 avatar Mar 29 '18 14:03 emi80

The problem remained when I corrected the mistake reported above, but I think I figured it out. It comes down to the bedGraphToBigWig version.

I was testing my bioConda environment, and there were only version 357.

It comes down to that v308 does not check chromosome sorting, but v357 does. I added v308 to bioconda and now it seems to work as intended. I'm running a test over night to confirm that I have it right this time. This done, I'll push/share the environment.

I'll leave this PR here if you want to update bedGraphToBigWig at a later time point. Although perhaps a newer version of STAR compensates for this... I don't know :)

karl616 avatar Apr 09 '18 14:04 karl616