Skip to content

Commit

Permalink
Merge pull request #121 from nf-core/mysolid-bugs
Browse files Browse the repository at this point in the history
Fix bugs pointed out by @mysolid on slack
  • Loading branch information
nictru authored May 22, 2024
2 parents 5ddc061 + e273f70 commit 74dfdf6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 89 deletions.
2 changes: 1 addition & 1 deletion bin/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
df_intergenic['transcript_id'] = 'intergenic_' + df_intergenic['name']

# Convert attributes to a dictionary
df['attributes'] = df['attributes'].apply(lambda row: dict([[value.strip(r'"') for value in entry.strip().split(' ')] for entry in row.split(';') if entry]))
df['attributes'] = df['attributes'].apply(lambda row: dict([[value.strip(r'"') for value in entry.strip().split(' ', 1)] for entry in row.split(';') if entry]))
# Keep only the attributes we want
df['attributes'] = df['attributes'].apply(lambda row: {key: row[key] for key in attributes if key in row})
# Convert attributes to columns
Expand Down
37 changes: 0 additions & 37 deletions bin/backsplice_gen.sh

This file was deleted.

7 changes: 4 additions & 3 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,14 @@ if (!params.skip_trimming) {
ext.suffix = "tidy.bed"
}

withName: FASTA {
ext.when = { params.module.split(',').contains('circrna_discovery') }
withName: ADD_BACKSPLICE {
ext.args = "'{ if (/^>/) { print \$0 } else { start = substr(\$0, 1, 25); print \$0 start } }'"
ext.suffix = "backspliced.fa"
publishDir = [
path: { "${params.outdir}/circrna_discovery/${meta.tool}/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
pattern: "*.fasta"
pattern: "*.backspliced.fa"
]
}

Expand Down
44 changes: 0 additions & 44 deletions modules/local/fasta/main.nf

This file was deleted.

11 changes: 7 additions & 4 deletions subworkflows/local/circrna_discovery.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ include { SJDB as DCC_MATE2_SJDB } from '../../modules/l
include { DCC } from '../../modules/local/dcc/dcc'
include { DCC_FILTER } from '../../modules/local/dcc/filter'
include { MAPSPLICE_ALIGN } from '../../modules/local/mapsplice/align'
include { FASTA } from '../../modules/local/fasta'
include { MERGE_TOOLS } from '../../modules/local/count_matrix/merge_tools'
include { COUNTS_COMBINED } from '../../modules/local/count_matrix/combined'
include { CIRCEXPLORER2_REFERENCE as CIRCEXPLORER2_REF } from '../../modules/local/circexplorer2/reference'
Expand All @@ -40,6 +39,8 @@ include { CIRCEXPLORER2_ANNOTATE as MAPSPLICE_ANNOTATE } from '../../modules/n
include { CIRCEXPLORER2_FILTER as MAPSPLICE_FILTER } from '../../modules/local/circexplorer2/filter'
include { UPSET as UPSET_SAMPLES } from '../../modules/local/upset'
include { UPSET as UPSET_ALL } from '../../modules/local/upset'
include { BEDTOOLS_GETFASTA } from '../../modules/nf-core/bedtools/getfasta'
include { GAWK as ADD_BACKSPLICE } from '../../modules/nf-core/gawk'

workflow CIRCRNA_DISCOVERY {

Expand Down Expand Up @@ -272,13 +273,15 @@ workflow CIRCRNA_DISCOVERY {
// FASTA WORKFLOW:
//

FASTA( ch_annotation_bed_merged, fasta )
BEDTOOLS_GETFASTA( ch_annotation_bed_merged, fasta )
ADD_BACKSPLICE( BEDTOOLS_GETFASTA.out.fasta, [])

ch_versions = ch_versions.mix(FASTA.out.versions)
ch_versions = ch_versions.mix(BEDTOOLS_GETFASTA.out.versions)
ch_versions = ch_versions.mix(ADD_BACKSPLICE.out.versions)

emit:
circrna_bed12 = ch_annotation_bed_merged
fasta = FASTA.out.analysis_fasta
fasta = ADD_BACKSPLICE.out.output
annotation_bed = REMOVE_SCORE_STRAND.out.output
annotation_gtf = COMBINE_ANNOTATION_GTFS.out.sorted
counts_bed = COUNTS_COMBINED.out.counts_bed
Expand Down

0 comments on commit 74dfdf6

Please sign in to comment.