Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify generation of gene bed to ensure 0-based start site #124

Merged
merged 5 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading