Skip to content

Commit

Permalink
Merge pull request #124 from mskcc/bugfix/genebed_0base_start
Browse files Browse the repository at this point in the history
Modify generation of gene bed to ensure 0-based start site
  • Loading branch information
pintoa1-mskcc authored Oct 10, 2024
2 parents 5996996 + a732d94 commit dce1712
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#125](https://github.com/mskcc/forte/pull/125) - update upload-artifact version because the version previously in use (v2) is deprecated.

- [#124](https://github.com/mskcc/forte/pull/124) - ensure genebed file as 0based start site

- [#127](https://github.com/mskcc/forte/pull/127) - allow dynamic increase of memory for process_single label

### `Dependencies`
Expand Down
3 changes: 2 additions & 1 deletion bin/final_generate_v75_gene_bed.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ gtf_df <- as.data.frame(gtf)

file.to_write <- args[2]

### ensure start is 0 based
gtf_df <- gtf_df %>%
rename(
chr = seqnames
) %>%
select(c(chr, start, end, transcript_id, type, strand, gene_name, gene_id)) %>%
filter(type %in% c("exon","intron","UTR","CDS","cds","utr"))
filter(type %in% c("exon","intron","UTR","CDS","cds","utr")) %>% mutate(start = start-1)


#START CLOCK
Expand Down
3 changes: 2 additions & 1 deletion modules/local/metafusion/genebed/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process METAFUSION_GENEBED {

input:
tuple val(meta), path(gff)
val ensembl_version

output:
tuple val(meta), path("*.metafusion.gene.bed"), emit: metafusion_gene_bed
Expand All @@ -23,7 +24,7 @@ process METAFUSION_GENEBED {
"""
final_generate_v75_gene_bed.R \\
$gff \\
${prefix}.metafusion.gene.bed
${ensembl_version}.metafusion.gene.bed
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ gtf_df <- as.data.frame(gtf)

file.to_write <- args[2]

### ensure start is 0 based
gtf_df <- gtf_df %>%
rename(
chr = seqnames
) %>%
select(c(chr, start, end, transcript_id, type, strand, gene_name, gene_id)) %>%
filter(type %in% c("exon","intron","UTR","CDS","cds","utr"))
filter(type %in% c("exon","intron","UTR","CDS","cds","utr")) %>% mutate(start = start-1)


#START CLOCK
Expand Down
3 changes: 2 additions & 1 deletion subworkflows/local/prepare_references.nf
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ workflow PREPARE_REFERENCES {
)

METAFUSION_GENEBED(
AGAT_SPADDINTRONS.out.gff
AGAT_SPADDINTRONS.out.gff,
params.ensembl_version
)

METAFUSION_GENEINFO(
Expand Down

0 comments on commit dce1712

Please sign in to comment.