-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from uclahs-cds/nwiltsie-bootstrap
Bootstrap repository with minimal working pipeline
- Loading branch information
Showing
30 changed files
with
1,395 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Default owner(s) | ||
* @tyamaguchi-ucla @yashpatel6 @zhuchcn @uclahs-cds/software-wg | ||
* @uclahs-cds/nextflow-wg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Update image in GHCR | ||
|
||
run-name: > | ||
${{ | ||
github.event_name == 'delete' && format( | ||
'Delete `{0}{1}`', | ||
github.event.ref_type == 'branch' && 'branch-' || '', | ||
github.event.ref | ||
) | ||
|| github.ref == 'refs/heads/main' && 'Update `dev`' | ||
|| format( | ||
'Update `{0}{1}`', | ||
!startsWith(github.ref, 'refs/tags') && 'branch-' || '', | ||
github.ref_name | ||
) | ||
}} docker tag | ||
on: | ||
push: | ||
branches-ignore: ['gh-pages'] | ||
tags: ['v*'] | ||
delete: | ||
|
||
jobs: | ||
push-or-delete-image: | ||
runs-on: ubuntu-latest | ||
name: Update GitHub Container Registry | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: uclahs-cds/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
- main | ||
|
||
jobs: | ||
CICD-base: | ||
static-analysis: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
ARG R_VERSION=4.3.1 | ||
|
||
FROM rocker/r-ver:${R_VERSION} AS build | ||
|
||
COPY docker/install-stablelift.R /tmp | ||
RUN Rscript /tmp/install-stablelift.R | ||
|
||
FROM rocker/r-ver:${R_VERSION} | ||
|
||
# Overwrite the site library with just the desired packages. By default rocker | ||
# only bundles docopt and littler in that directory. | ||
COPY --from=build /tmp/userlib /usr/local/lib/R/site-library | ||
|
||
# Install python (required for argparse). The version is not important, but | ||
# let's pin it for stability. | ||
ARG PYTHON_VERSION=3.10.6-1~22.04 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
python3=${PYTHON_VERSION} \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Add a new user/group called bldocker | ||
RUN groupadd -g 500001 bldocker && \ | ||
useradd -l -r -u 500001 -g bldocker bldocker | ||
|
||
# Change the default user to bldocker from root | ||
USER bldocker | ||
|
||
LABEL maintainer="Nicholas Wiltsie <[email protected]" \ | ||
org.opencontainers.image.source=https://github.com/uclahs-cds/pipeline-StableLift |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +0,0 @@ | ||
// Static process resource allocation here | ||
// Specific for each node type - F72 here | ||
process { | ||
withName: process_name { | ||
cpus = <allocated cpus> | ||
memory = <allocated memory> | ||
// Other process-specific allocations here | ||
} | ||
withName: process_name_2 { | ||
cpus = <allocated cpus> | ||
memory = <allocated memory> | ||
// Other process-specific allocations here | ||
} | ||
withName: process_name_3 { | ||
cpus = <allocated cpus> | ||
memory = <allocated memory> | ||
// Other process-specific allocations here | ||
} | ||
withName: example_process { | ||
cpus = 2 | ||
memory = 5.GB | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import nextflow.Nextflow | ||
|
||
/** | ||
* This custom schema namespace implements a custom type for Funcotator data sources. | ||
*/ | ||
custom_schema_types { | ||
|
||
/** | ||
* Check that input refers to a properly configured Funcotator data source | ||
* directory | ||
*/ | ||
check_funcotator_data_source = { Map options, String name, Map properties -> | ||
if (!(options[name] in Map)) { | ||
throw new Exception("${name} should be a Map, not ${options[name].getClass()}.") | ||
} | ||
|
||
options[name].each { entry -> | ||
def entry_as_map = [:] | ||
entry_as_map[entry.key] = entry.value | ||
schema.validate_parameter(entry_as_map, entry.key, properties.elements[entry.key]) | ||
} | ||
|
||
/* | ||
Confirm that the destination reference sequence ID is a valid subfolder | ||
in at least _one_ of the data sources. A reference-specific data source | ||
directory requires a .config file at a path like: | ||
dataSourcesFolder/<sourcename>/hg19/<name>.config | ||
dataSourcesFolder/<sourcename>/hg38/<name>.config | ||
There can be mulitple <sourcename> folders, but there should be only | ||
one config per reference-specific subfolder. | ||
*/ | ||
config_glob = [ | ||
options[name].data_source, | ||
"*", | ||
options[name].dest_reference_id, | ||
"*.config" | ||
].join("/") | ||
|
||
if (!Nextflow.file(config_glob)) { | ||
throw new Exception("${name} is improperly configured - no files found matching '${config_glob}'") | ||
} | ||
} | ||
|
||
types = [ | ||
'FuncotatorDataSource': custom_schema_types.check_funcotator_data_source | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
sample_id: | ||
type: 'String' | ||
required: true | ||
help: 'sample id supplied from input yaml' | ||
save_intermediate_files: | ||
type: 'Bool' | ||
required: true | ||
default: false | ||
help: 'Enable to store intermediate files' | ||
output_dir: | ||
type: 'Path' | ||
mode: 'w' | ||
required: true | ||
help: 'absolute path to directory to store output' | ||
src_fasta_ref: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'Source reference sequence (FASTA)' | ||
src_fasta_fai: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'Source reference sequence index file' | ||
src_fasta_dict: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'Source reference sequence dictionary' | ||
dest_fasta_ref: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'Destination reference sequence (FASTA)' | ||
dest_fasta_fai: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'Destination reference sequence index file' | ||
dest_fasta_dict: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'Destination reference sequence dictionary' | ||
chain_file: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'FIXME ???' | ||
repeat_bed: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'FIXME ???' | ||
funcotator_data: | ||
type: 'FuncotatorDataSource' | ||
required: true | ||
help: 'Funcotator data source and reference sample IDs' | ||
elements: | ||
data_source: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'Root data source folder for Funcotator' | ||
src_reference_id: | ||
type: 'String' | ||
mode: 'r' | ||
required: true | ||
help: 'Reference build ID for the source sequence' | ||
dest_reference_id: | ||
type: 'String' | ||
mode: 'r' | ||
required: true | ||
help: 'Reference build ID for the destination sequence' | ||
rf_model: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'FIXME ???' | ||
input: | ||
type: 'Namespace' | ||
required: true | ||
help: 'Input sample' | ||
elements: | ||
vcf: | ||
type: 'Path' | ||
mode: 'r' | ||
required: true | ||
help: 'Input dataset supplied by input yaml' |
Oops, something went wrong.