Skip to content

Commit

Permalink
Merge pull request #107 from sanjaynagi/docker-user-config-01-10-24
Browse files Browse the repository at this point in the history
add docker user option in config for parabricks LSTM use
  • Loading branch information
sanjaynagi authored Oct 1, 2024
2 parents 11f63c6 + d0ff005 commit 1a3fac2
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.smk linguist-language=Python
Snakefile linguist-language=Python
# GitHub syntax highlighting
pixi.lock linguist-language=YAML

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ config/samples.tsv
workflow/scripts/misc
.test/workflow/scripts/
.ipynb_checkpoints
workflow/scripts/snpEff
workflow/scripts/snpEff# pixi environments
.pixi

3 changes: 2 additions & 1 deletion .test/config/config_paired_end.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
metadata: config/samples.tsv
pipeline: cpu
parabricks-docker-user: 1006:1006 # only if using parabricks pipeline at LSTM, otherwise ignore

# Dataset name
dataset: 'Test-GithubActionsCI'
Expand Down Expand Up @@ -47,7 +48,7 @@ DifferentialExpression: # Activate differential expression
gene-level:
activate: True
isoform-level:
activate: False
activate: True

progressiveGenes:
activate: True
Expand Down
1 change: 1 addition & 0 deletions .test/config/config_single_end.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
metadata: config/samples.tsv
pipeline: cpu
parabricks-docker-user: 1006:1006 # only if using parabricks pipeline at LSTM, otherwise ignore

# Dataset name
dataset: 'Test-GithubActionsCI'
Expand Down
3 changes: 2 additions & 1 deletion config/exampleconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# RNA-Seq-Pop
pipeline: parabricks #parabricks or cpu
metadata: config/samples.tsv # samplesheet metadata file
pipeline: cpu # parabricks or cpu
parabricks-docker-user: 1006:1006 # only if using parabricks pipeline at LSTM, otherwise ignore

dataset: 'Ag_Bouake' # Dataset name: Can be anything, will be used to name some main output files

Expand Down
17 changes: 8 additions & 9 deletions workflow/envs/sleuth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ channels:
- r
- bioconda
dependencies:
- "r-base>=4.0.0"
- "r-sleuth=0.30"
- "r-tidyverse=1.3.1"
- "r-data.table=1.14.0"
- "r-ggrepel=0.9.1"
- "r-openxlsx=4.2.3"
- "r-glue=1.4.2"
- "r-rcolorbrewer=1.1_2"
- "bioconductor-enhancedvolcano=1.8.0"
- r-base
- "r-sleuth=0.30.1"
- r-tidyverse
- r-data.table
- r-ggrepel
- r-openxlsx
- r-glue
- r-rcolorbrewer
8 changes: 5 additions & 3 deletions workflow/rules/star-haplotypecaller.smk
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ rule fq2bam:
resources:
all_gpus = 1
params:
wkdir=wkdir
wkdir=wkdir,
docker_user = config['parabricks-docker-user']
shell:
"""
docker run --user 1006:1006 --rm --gpus all --volume {wkdir}:/workdir --workdir /workdir nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1 \
docker run --user {params.docker_user} --rm --gpus all --volume {wkdir}:/workdir --workdir /workdir nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1 \
pbrun rna_fq2bam \
--in-fq /workdir/{input.reads[0]} /workdir/{input.reads[1]} \
--genome-lib-dir /workdir/resources/reference/star_index\
Expand Down Expand Up @@ -75,10 +76,11 @@ rule haplotype_caller:
all_gpus = 1
params:
wkdir=wkdir,
docker_user = config['parabricks-docker-user'],
ploidy=config['VariantAnalysis']['ploidy']
shell:
"""
docker run --user 1006:1006 --rm --gpus all --volume {wkdir}:/workdir -w /workdir nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1 \
docker run --user {params.docker_user} --rm --gpus all --volume {wkdir}:/workdir -w /workdir nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1 \
pbrun haplotypecaller \
--rna \
--ref /workdir/{input.ref_fasta} \
Expand Down
8 changes: 0 additions & 8 deletions workflow/scripts/SleuthIsoformsDE.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ library(ggrepel)
library(openxlsx)
library(glue)
library(RColorBrewer)
library(EnhancedVolcano)

print("------------- Kallisto - Sleuth - RNASeq isoform Differential expression ---------")
#### read data ####
Expand Down Expand Up @@ -87,13 +86,6 @@ for (cont in contrasts){
labels = results %>% dplyr::mutate("Gene_name" = case_when(GeneName == "" ~ TranscriptID,
is.na(GeneName) ~ TranscriptID,
TRUE ~ GeneName)) %>% select(Gene_name) %>% deframe()
pdf(glue("results/isoformdiff/Volcano_plot_{cont}.pdf"))
print(EnhancedVolcano(results_list[[cont]],
lab=labels,
x='b',
y='pval',
title = cont))
garbage = dev.off()
print(glue("{cont} complete!"))
}

Expand Down

0 comments on commit 1a3fac2

Please sign in to comment.