rnajena / poseidon

PoSeiDon: positive selection detection and recombination analysis pipeline
MIT License
35 stars 10 forks source link

User-friendly error messages #11

Open hoelzer opened 4 years ago

hoelzer commented 4 years ago

Currently, PoSeiDon does not have a user-friendly error control and feedback. This can be implemented using functionalities such as

annotated_reads
    .map{ row -> row[-2]}
    .collect()
    .subscribe onNext: {
        for ( i in it ){
        assert 2 <= it.count(i)
        }
    }, onError: { exit 1, 'You need at least 2 samples per condition to perform a differential gene expression analysis.' }

or

if ( ! (params.tpm instanceof java.lang.Double || params.tpm instanceof java.lang.Float || params.tpm instanceof java.lang.Integer) ) {
    exit 1, "--tpm has to be numeric"
}

(stolen from https://github.com/hoelzer-lab/rnaseq/blob/master/main.nf)

hoelzer commented 4 years ago

Added some basic error handling of the input FASTA file including terminal print outs and stop of the workflow if the FASTA is not valid.

Missing: error handling in later steps of the pipeline w/ terminal prints