During one step of the analysis, Tradis filters out all of the reads from a fastq which don't contain a specified tag. This was causing errors if none of the reads have that tag.
I've changed the behaviour so that if one of the input files doesn't have the tag it raises a warning and skips that input file out of the rest of the analysis.
If none of the input files have a read with the tag in them, it raises a warning for each input file and then fails noisily.
I've added tests for the happy case (all inputs have the tag), the mixed case and the unhappy case and everything seems happy.
There might have been better ways of doing this. I'm in two minds about the way I've raised / caught exceptions and I'm not sure if there was a better way to have caught / counted the warnings. Any suggestions or feedback would be warmly received.
During one step of the analysis, Tradis filters out all of the reads from a fastq which don't contain a specified tag. This was causing errors if none of the reads have that tag.
I've changed the behaviour so that if one of the input files doesn't have the tag it raises a warning and skips that input file out of the rest of the analysis.
If none of the input files have a read with the tag in them, it raises a warning for each input file and then fails noisily.
I've added tests for the happy case (all inputs have the tag), the mixed case and the unhappy case and everything seems happy.
There might have been better ways of doing this. I'm in two minds about the way I've raised / caught exceptions and I'm not sure if there was a better way to have caught / counted the warnings. Any suggestions or feedback would be warmly received.