Skip to content

Commit

Permalink
Merge pull request #6 from microbiomedata/5-readqc-is-missing-ribosom…
Browse files Browse the repository at this point in the history
…al-sequences-file

added ribosomal output
  • Loading branch information
kaijli authored Jul 25, 2024
2 parents 8ce001d + 39e5ae6 commit 7eb2e11
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/wdl_linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: MiniWDL linter CI

on:
pull_request:
branches: main

jobs:
run-miniwdl:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8' # specify the Python version you need

- name: Install MiniWDL
run: |
python -m pip install --upgrade pip
pip install miniwdl
- name: Run MiniWDL
run: |
# Add the commands to run your MiniWDL workflow
miniwdl check --suppress UnknownRuntimeKey rqcfilter.wdl
11 changes: 9 additions & 2 deletions rqcfilter.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ workflow metaTReadsQC {
prefix = prefix,
filtered = qc.filtered,
filtered_stats = qc.stat,
filtered_stats2 = qc.stat2
filtered_stats2 = qc.stat2,
filtered_ribo = qc.filtered_ribo
}
output {
File filtered_final = finish_rqc.filtered_final
File filtered_stats_final = finish_rqc.filtered_stats_final
File filtered_stats2_final = finish_rqc.filtered_stats2_final
File rqc_info = make_info_file.rqc_info
File filtered_ribo_final = finish_rqc.filtered_ribo_final
}
}

Expand Down Expand Up @@ -158,6 +160,7 @@ task rqcfilter{
String filename_stat2="filtered/filterStats2.txt"
String filename_stat_json="filtered/filterStats.json"
String filename_reproduce="filtered/reproduce.sh"
String filename_ribo = "filtered/rRNA.fastq.gz"
}
command<<<
Expand Down Expand Up @@ -186,7 +189,7 @@ task rqcfilter{
minlen=51 \
mlf=0.33 \
mtst=t \
outribo=ribo.fq.gz \
outribo=rRNA.fastq.gz \
path=filtered \
phix=t \
pigz=t \
Expand Down Expand Up @@ -234,6 +237,7 @@ task rqcfilter{
File stat2 = filename_stat2
File info_file = filename_reproduce
File filtered = glob("filtered/*fastq.gz")[0]
File filtered_ribo = filename_ribo
File json_out = filename_stat_json
}
runtime {
Expand Down Expand Up @@ -276,6 +280,7 @@ task finish_rqc {
File filtered_stats
File filtered_stats2
File filtered
File filtered_ribo
String container
String prefix
}
Expand All @@ -288,6 +293,7 @@ task finish_rqc {
ln ~{filtered} ~{prefix}_filtered.fastq.gz || ln -s ~{filtered} ~{prefix}_filtered.fastq.gz
ln ~{filtered_stats} ~{prefix}_filterStats.txt || ln -s ~{filtered_stats} ~{prefix}_filterStats.txt
ln ~{filtered_stats2} ~{prefix}_filterStats2.txt || ln -s ~{filtered_stats2} ~{prefix}_filterStats2.txt
ln ~{filtered_ribo} ~{prefix}_rRNA.fastq.gz || ln -s ~{filtered_ribo} ~{prefix}_rRNA.fastq.gz
# Generate stats but rename some fields untilt the script is fixed.
/scripts/rqcstats.py ~{filtered_stats} > stats.json
Expand All @@ -298,6 +304,7 @@ task finish_rqc {
File filtered_final = "~{prefix}_filtered.fastq.gz"
File filtered_stats_final = "~{prefix}_filterStats.txt"
File filtered_stats2_final = "~{prefix}_filterStats2.txt"
File filtered_ribo_final = "~{prefix}_rRNA.fastq.gz"
}

runtime {
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.3
v0.0.4

0 comments on commit 7eb2e11

Please sign in to comment.