zhoulab / p53-chip-seq-data

Basic machine learning on genomic data
0 stars 0 forks source link

Catch errors when piping in Makefile #16

Open victorlin opened 6 years ago

victorlin commented 6 years ago

Don't write anything to target unless it's the intended output.

victorlin commented 6 years ago

In short, this is not possible:

Python scripts have been modified to output to a file rather than sys.stdout. The only concern would be the piping commands. Error most likely would happen if:

  1. Command not found (module not loaded on HPG)
  2. Incorrect file format (ex. BED for bedtools, bedmap)
  3. Anything else that would cause an error to be piped to stdout (ex. no file)
    1. annotatePeaks.pl ... > [FILE]
    2. homerTools ... > [FILE]

Some non-errors to test for (#23):

  1. tail-ing a file with no header will still result in a proper BED format, but the first interval will be lost.