Empty GFF bug CW-5438

This commit is contained in:
Neil Horner 2024-12-18 15:01:33 +00:00
parent 74c19f1ea5
commit 0ec44d03bd
2 changed files with 12 additions and 6 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unrelased]
### Fixed
- merge_gff_compare failing with empty GFF files.
## [v1.6.0]
### Fixed
- v1.5.0 bug; access to undefined channel output bug when using precomputed transcriptome.

14
main.nf
View File

@ -271,7 +271,7 @@ process merge_gff_bundles{
memory "2 GB"
input:
tuple val(sample_id), path (gff_bundle)
tuple val(sample_id), path ('gff_bundles/annotation*.gff')
output:
tuple val(sample_id), path("${sample_id}.gff"), emit: gff
tuple val(sample_id), path("transcriptome_summary.pickle"), emit: summary
@ -281,11 +281,13 @@ process merge_gff_bundles{
echo '##gff-version 2' >> $merged_gff;
echo '#pipeline-nanopore-isoforms: stringtie' >> $merged_gff;
for fn in ${gff_bundle};
do
grep -v '#' \$fn >> $merged_gff
done
find -L gff_bundles -type f -name "*.gff" \
-exec awk '!/^#/ {print}' {} \\; >> "${sample_id}.gff"
if ! [ -s "${sample_id}.gff" ]; then
echo "No transcripts found for ${sample_id}"
# This is unlikely to ever happen, but if it does, we should fail the workflow.
exit 70
fi
workflow-glue summarise_gff \
$merged_gff \