Skip to content

Commit

Permalink
correction to add the fasta to the submission subworkflow channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Rowell authored and Jessica Rowell committed Apr 9, 2024
1 parent a68466d commit 905f122
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 2 additions & 0 deletions bin/repeatmasker_liftoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def annotation_main():

#gather ref sample id
ref_id=ref_gff['seq_id'][0]
print(f'refgff is {args.refgff}')
print(ref_gff.head())
#gather index of attributes for first and second ITRs; needed for repeatmasker ITR attributes
first_ITR_index=ref_gff[ref_gff['attributes'].str.contains("ITR")].index[0]
last_ITR_index=ref_gff[ref_gff['attributes'].str.contains("ITR")].index[-1]
Expand Down
6 changes: 1 addition & 5 deletions modules/local/concat_gffs/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ process CONCAT_GFFS {

input:
path ref_gff_path
//path repeatmasker_gff
//path liftoff_gff
tuple val(meta), path(repeatmasker_gff), path(liftoff_gff)
tuple val(meta), path(fasta_path), path(fastq_1), path(fastq_2)
tuple val(meta), path(fasta_path), path(fastq_1), path(fastq_2), path(repeatmasker_gff), path(liftoff_gff)

script:
"""
echo "repeatmasker_liftoff.py --repeatm_gff $repeatmasker_gff --liftoff_gff $liftoff_gff --refgff $ref_gff_path --fasta $fasta_path --sample_name $meta.id"
repeatmasker_liftoff.py --repeatm_gff $repeatmasker_gff --liftoff_gff $liftoff_gff --refgff $ref_gff_path --fasta $fasta_path --sample_name $meta.id
"""

Expand Down
13 changes: 6 additions & 7 deletions subworkflows/local/repeatmasker_liftoff.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include { CONCAT_GFFS } from "../../module
workflow REPEATMASKER_LIFTOFF {

take:
fasta
fasta // meta, fasta_path, fastq1, fastq2

main:
// run repeatmasker annotation on files
Expand All @@ -31,24 +31,23 @@ workflow REPEATMASKER_LIFTOFF {
repeatmasker_gff_ch = REPEATMASKER.out.gff.collect().flatten()
.map {
meta = [:]
meta['id'] = [id:it.getSimpleName()]
meta['id'] = it.getSimpleName()
[ meta, it ]
}

liftoff_gff_ch = LIFTOFF_CLI.out.gff.collect().flatten()
.map {
meta = [:]
meta['id'] = [id:it.getSimpleName()]
meta['id'] = it.getSimpleName()
[ meta, it ]
}

concat_gffs_ch = repeatmasker_gff_ch.join(liftoff_gff_ch) // meta.id, fasta, repeatmasker_gff, liftoff_gff
concat_gffs_ch = fasta.join(repeatmasker_gff_ch).join(liftoff_gff_ch) // meta.id, fasta, fastq1, fastq2, repeatmasker_gff, liftoff_gff

// concat gffs
// concat gffs
CONCAT_GFFS (
params.ref_gff_path,
concat_gffs_ch,
fasta
concat_gffs_ch
)

emit:
Expand Down
3 changes: 3 additions & 0 deletions workflows/tostadas.nf
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ workflow TOSTADAS {
GET_WAIT_TIME (
METADATA_VALIDATION.out.tsv_Files.collect()
)

submission_ch.view()

INITIAL_SUBMISSION (
submission_ch, // meta.id, fasta, fastq1, fastq2, gff
params.submission_config,
Expand Down

0 comments on commit 905f122

Please sign in to comment.