Skip to content

Commit

Permalink
Merge pull request #130 from Plant-Food-Research-Open/fix/mergefail
Browse files Browse the repository at this point in the history
Fixed post-liftoff merge
  • Loading branch information
GallVp authored Dec 16, 2024
2 parents 9759882 + fa28176 commit 2a0c7a2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2. Switched branch name from `master` to `main` in the GHA CIs
3. Fixed an issue in `genepal_report.Rmd` which caused the pangene matrix plot to fail when the number of clusters exceeded 65536 [#124](https://github.com/Plant-Food-Research-Open/genepal/issues/124)
4. Fixed an issue where `GENEPALREPORT` process failed due to OOM kill signal from SLURM [#123](https://github.com/Plant-Food-Research-Open/genepal/issues/123)
5. Fixed an issue where Gff merge after liftoff failed when one of the Gff files did not contain any genes

### `Dependencies`

Expand Down
21 changes: 20 additions & 1 deletion subworkflows/local/fasta_liftoff/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,26 @@ workflow FASTA_LIFTOFF {
)

ch_liftoff_gff3 = LIFTOFF.out.polished_gff3
| map { meta, gff -> [ [ id: meta.target_assembly ], gff ] }
| map { meta, gff ->

def gene_count = gff.readLines()
.findAll { it ->
if ( it.startsWith('#') ) { return false }

def cols = it.split('\t')
def feat = cols[2]

if ( feat != 'gene' ) { return false }

return true
}.size()

// To avoid failure in AGAT_SPMERGEANNOTATIONS
// when one of the GFF files is empty
if ( gene_count < 1 ) { return null }

[ [ id: meta.target_assembly ], gff ]
}
| groupTuple

ch_versions = ch_versions.mix(LIFTOFF.out.versions.first())
Expand Down
22 changes: 2 additions & 20 deletions tests/stub/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"full - stub": {
"content": [
{
"successful tasks": 166,
"successful tasks": 126,
"versions": {
"AGAT_CONVERTSPGFF2GTF": {
"agat": "v1.4.0"
Expand All @@ -16,15 +16,6 @@
"AGAT_SPEXTRACTSEQUENCES": {
"agat": "v1.4.0"
},
"AGAT_SPFILTERFEATUREFROMKILLLIST": {
"agat": "v1.4.0"
},
"AGAT_SPFLAGSHORTINTRONS": {
"agat": "v1.4.1"
},
"AGAT_SPMERGEANNOTATIONS": {
"agat": "v1.4.0"
},
"BENCHMARK": {
"gffcompare": "0.12.6"
},
Expand All @@ -46,9 +37,6 @@
"CAT_PROTEIN_FASTAS": {
"pigz": "2.3.4"
},
"COMPARE_BRAKER_TO_LIFTOFF": {
"gffcompare": "0.12.6"
},
"CUSTOM_SRATOOLSNCBISETTINGS": {
"sratools": "3.0.8"
},
Expand Down Expand Up @@ -79,9 +67,6 @@
"GFF2FASTA_FOR_EGGNOGMAPPER": {
"gffread": "0.12.7"
},
"GFFREAD_AFTER_LIFTOFF": {
"gffread": "0.12.7"
},
"GFFREAD_BEFORE_LIFTOFF": {
"gffread": "0.12.7"
},
Expand All @@ -106,9 +91,6 @@
"LIFTOFF": {
"liftoff": "v1.6.3"
},
"MERGE_LIFTOFF_ANNOTATIONS": {
"agat": "v1.4.0"
},
"ORTHOFINDER": {
"orthofinder": "2.5.5"
},
Expand Down Expand Up @@ -208,6 +190,6 @@
"nf-test": "0.9.2",
"nextflow": "24.04.4"
},
"timestamp": "2024-12-11T21:51:12.841395"
"timestamp": "2024-12-16T13:24:49.69503"
}
}

0 comments on commit 2a0c7a2

Please sign in to comment.