Skip to content

Commit

Permalink
Merge pull request #5 from dbmi-bgm/annotation
Browse files Browse the repository at this point in the history
CNVs annot
  • Loading branch information
B3rse authored Jan 23, 2023
2 parents 57a8a8f + 2c55c1c commit 2dbf103
Show file tree
Hide file tree
Showing 16 changed files with 651 additions and 531 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.0
v1.1.0
81 changes: 0 additions & 81 deletions cwl/workflow_ascat.cwl

This file was deleted.

File renamed without changes.
56 changes: 56 additions & 0 deletions descriptions/driver_catalog.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0

class: CommandLineTool

requirements:
- class: InlineJavascriptRequirement

hints:
- class: DockerRequirement
dockerPull: ACCOUNT/genomic_ranges:VERSION

baseCommand: [driver_catalog.sh]

inputs:
- id: ascat
type: File
inputBinding:
prefix: "--ascat"
doc: tsv file containing ASCAT CNVs

- id: gene_panel
type: File
inputBinding:
prefix: "--gene_panel"
doc: tsv configuration file of which genes to add to the driver catalog from Hartwig Medical Foundation

- id: cgap_genes
type: File
inputBinding:
prefix: "--cgap_genes"
doc: tsv file of genes available on CGAP

- id: ascat_objects
type: File
inputBinding:
prefix: "--ascat_objects"
doc: ascat objects from the CGAP SV somatic pipeline (ASCAT)

- id: output
type: string
inputBinding:
prefix: "--output"
default: putative_drivers_CNV_ASCAT.tsv
doc: output file name

outputs:
- id: putative_drivers_tsv
type: File
outputBinding:
glob: $(inputs.output).gz
doc: tsv file containing reported putative drivers

doc: |
run driver_catalog.sh
48 changes: 48 additions & 0 deletions dockerfiles/genomic_ranges/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#######################################################################
# Basic image
#######################################################################
FROM cgap/cgap-ubuntu2004-py-38:0.0.1
MAINTAINER Michele Berselli ([email protected]), Dominika Maziec ([email protected])

#######################################################################
# General updates & installing necessary Linux components
# - tabix brings in bgzip and tabix
# - locales for UTF-8
#######################################################################
RUN apt-get update && apt-get install -y \
locales \
tabix

#######################################################################
# Software
#######################################################################
## Install R
RUN apt-get install -y --no-install-recommends r-base
RUN apt-get install -y --no-install-recommends r-cran-tidyverse r-cran-optparse r-cran-biocmanager

## Install GenomicRanges
RUN R -e "BiocManager::install('GenomicRanges')"

#######################################################################
# Setting working env
#######################################################################
WORKDIR /usr/local/bin

#######################################################################
# Scripts
#######################################################################
## driver_catalog.sh
COPY scripts/driver_catalog.sh .
RUN chmod +x driver_catalog.sh

## postprocess_ascat.R
COPY scripts/postprocess_ascat.R .

#######################################################################
# Setting env variables
#######################################################################
## Supporting UTF-8
RUN locale-gen "en_US.UTF-8" && update-locale LC_ALL="en_US.UTF-8"
ENV LC_ALL=en_US.UTF-8

CMD ["bash"]
33 changes: 33 additions & 0 deletions dockerfiles/genomic_ranges/scripts/driver_catalog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

WORKDIR="/usr/local/bin"

while [ "$1" != "" ]; do
case $1 in
--ascat)
shift
ascat=$1
;;
--gene_panel)
shift
gene_panel=$1
;;
--cgap_genes)
shift
cgap_genes=$1
;;
--ascat_objects)
shift
ascat_objects=$1
;;
--output)
shift
output=$1
;;
esac
shift
done


Rscript $WORKDIR/postprocess_ascat.R --ascat $ascat --ascat_objects $ascat_objects --gene_panel $gene_panel --cgap_genes $cgap_genes --output $output || exit 1
gzip $output || exit 1
Loading

0 comments on commit 2dbf103

Please sign in to comment.