Skip to content

Commit

Permalink
Merge pull request #39 from jhuapl-bio/prerelease
Browse files Browse the repository at this point in the history
v0.5.1 release
  • Loading branch information
tmehoke authored Mar 1, 2021
2 parents 80dc192 + c3a1bb4 commit d5d0e2f
Show file tree
Hide file tree
Showing 7 changed files with 755 additions and 5 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build_push_docker-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and push Docker image for pre-release

on:
push:
branches: staging

jobs:
push_to_registry:
name: Build and push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:

- name: Check out the repo
uses: actions/checkout@v2

- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ secrets.DOCKERHUB_REPOSITORY }}
tag_with_ref: true
tag_with_sha: true
tags: staging
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and push Docker image upon release
name: Build and push Docker image for staging

on:
push:
Expand All @@ -21,4 +21,4 @@ jobs:
repository: ${{ secrets.DOCKERHUB_REPOSITORY }}
tag_with_ref: true
tag_with_sha: true
tags: dev
tags: staging
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# Basestack consensus

This pipeline is an implementation of the ARTIC network pipeline that is deployed in a Docker container that can be easily installed using the Basestack platform (https://github.com/jhuapl-bio/Basestack).

## Normal usage

Install Basestack as described here: https://github.com/jhuapl-bio/Basestack and install the 'Consensus' module.

## Development usage

The pipeline can be directly run, for development or other command line use, with the following commands:

1. Download the latest version of the pipeline with:

```sh
docker pull jhuaplbio/basestack_consensus:latest
```

2. Connect a MinION sequencing run folder to a container of that image:

```sh
docker container run \
--rm \
-it \
-v /path/to/local/MinION/data:/opt/basestack_consensus/sequencing_runs/example-run \
jhuaplbio/basestack_consensus:latest \
bash
```

3. Within the container, run the pipeline on the MinION run folder:
```sh
artic-module1-barcode-demux.sh -i /opt/basestack_consensus/sequencing_runs/example-run
```
7 changes: 5 additions & 2 deletions pipeline_scripts/report-template.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,12 @@ for(i in sample_barcodes) {
rownames(depth_plot_mean) <- sample_barcodes
# identify low coverage regions
threshold <- NULL
if(!is.null(postfilt_all)) {
threshold <- as.numeric(postfilt_all$ont_depth_thresh[1])
} else {
numeric_thresholds <- !is.na(as.numeric(postfilt_all$ont_depth_thresh))
threshold <- max(as.numeric(postfilt_all$ont_depth_thresh[numeric_thresholds]))
}
if(!is.integer(threshold)) {
threshold <- 20
}
#below_threshold <- function(v) { return(v<=threshold) }
Expand Down
21 changes: 20 additions & 1 deletion pipeline_scripts/report_summary_table.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,26 @@ else
echo_log "Demux count already present - will not overwrite it"
fi

ont_depth_thresh=$(head -n2 "$postfilt_all" | awk -F $'\t' '{if(NR==1){for(i=1; i<=NF; i++){if($i=="ont_depth_thresh"){col=i;}}}else{print $col}}')
# identify max ONT depth threshold from postfilt_all (default to 20 if non-numeric)
ont_depth_thresh=$(awk -F $'\t' '{
if(NR==1) {
for(i=1; i<=NF; i++) {
if($i=="ont_depth_thresh") {
col=i;
}
}
} else {
if($col > thresh) {
thresh = $col
}
}
} END {
if(thresh+1-1 == thresh) {
print(thresh);
} else {
print(20);
}
}' "$postfilt_all")
echo_log "Depth threshold: $ont_depth_thresh"

echo_log "Reading manifest"
Expand Down

0 comments on commit d5d0e2f

Please sign in to comment.