Skip to content

Commit

Permalink
resolving a docker issue and making vcf annotation inputs optional
Browse files Browse the repository at this point in the history
  • Loading branch information
nrminor committed Aug 27, 2024
1 parent 73802a9 commit 49c8e01
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ RUN apt-get update && \
make \
gcc \
cmake \
libxml2-dev \
libxslt-dev \
git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
Expand Down Expand Up @@ -50,7 +52,7 @@ RUN cd $HOME && PIXI_ARCH=x86_64 curl -fsSL https://pixi.sh/install.sh | bash
ENV PATH $PATH:$HOME/.pixi/bin

# 4) make the src directory required for PyPI dependencies and install everything
RUN cd $HOME && mkdir /src && pixi install
RUN cd $HOME && pixi install

# 5) modify the shell config so that each container launches within the pixi env
RUN echo "export PATH=$PATH:$HOME/.pixi/envs/default/bin" >> $HOME/.bashrc
Expand Down
18 changes: 8 additions & 10 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,13 @@ workflow {
// Checking for required files
// ---------------------------------------------------------------------- //

// make sure provided refseq is provided and exists
// make sure a reference sequence FASTA, the minimum pipeline dependency, is
// provided and exists
assert params.refseq :
"Please provide a reference FASTA file with the parameter `refseq`."
assert file(params.refseq).isFile() :
"Please double check that the reference FASTA file provided with the parameter `refseq` exists."

// make sure required snpeff config is provided and exists
assert params.snpEff_config :
"Please provide a snpEff config file with the parameter `snpEff_config`."
assert file(params.snpEff_config).isFile() :
"Please double check that the snpEff config file provided with the parameter `snpEff_config` exists."

// ---------------------------------------------------------------------- //

// initialize input channels
Expand All @@ -97,8 +92,9 @@ workflow {
Channel.fromPath( params.ref_gbk ) :
Channel.empty()

ch_snpeff_config = Channel
.fromPath( params.snpEff_config )
ch_snpeff_config = Channel ?
.fromPath( params.snpEff_config ) :
Channel.empty()

// decide whether to run the ont or the illumina workflow
if ( params.platform == "ont" ) {
Expand All @@ -114,7 +110,9 @@ workflow {

ILLUMINA (
ch_primer_bed,
ch_refseq
ch_refseq,
ch_ref_gbk,
ch_snpeff_config
)

} else {
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ rust = ">=1.77.2,<1.80"
csvtk = ">=0.30.0,<0.31"
snpsift = ">=5.2,<6"
loguru = ">=0.7.2,<0.8"
lxml = ">=5.2.2,<5.3"
4 changes: 3 additions & 1 deletion workflows/illumina.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ workflow ILLUMINA {
take:
ch_primer_bed
ch_refseq
ch_ref_gbk
ch_snpeff_config

main:
assert params.platform == "illumina"
Expand Down Expand Up @@ -67,7 +69,7 @@ workflow ILLUMINA {
VARIANTS (
ALIGNMENT.out,
ch_refseq,
ch_refgbk,
ch_ref_gbk,
ch_snpeff_config
)

Expand Down

0 comments on commit 49c8e01

Please sign in to comment.