Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b0fb84e
Update gitbook-sync.yml
Jan 20, 2026
c3c6b0d
Update gitbook-sync.yml
Jan 20, 2026
862efb5
yml formatting
Jan 20, 2026
99ac7ea
yml formatting
Jan 20, 2026
78662a5
Update gitbook-sync.yml
Jan 20, 2026
a9967df
Update gitbook-sync.yml
Jan 20, 2026
f8de3d1
Update gitbook-sync.yml
Jan 20, 2026
f190c26
Update gitbook-sync.yml
Jan 20, 2026
82ae920
Update gitbook-sync.yml
Jan 20, 2026
ecec980
Update gitbook-sync.yml
Jan 20, 2026
2ee566f
Update update_summary.py
Jan 20, 2026
223e3de
Update update_summary.py
Jan 20, 2026
63ef113
Update update_summary.py
Jan 20, 2026
a4559b9
Update update_summary.py
Jan 20, 2026
0ce574b
Update update_summary.py
Jan 20, 2026
68aa0e8
fixing update summary
Jan 20, 2026
2e8428b
Update gitbook-sync.yml
Jan 20, 2026
8095613
fixing summary
Jan 20, 2026
45c1795
generate READMEs
Jan 20, 2026
8b19b9c
update summary
Jan 20, 2026
b2ac3a4
Update update_summary.py
Jan 20, 2026
0eff8d2
Update update_summary.py
Jan 20, 2026
fcf4fe9
Update update_summary.py
Jan 20, 2026
b8c6442
Update update_summary.py
Jan 20, 2026
7c5e35c
Update gitbook-sync.yml
Jan 20, 2026
3a20429
Update gitbook-sync.yml
Jan 20, 2026
9b97424
sub-tools vs no sub-tools
Jan 21, 2026
384c732
Update gitbook-sync.yml
Jan 21, 2026
7e34921
Update gitbook-sync.yml
Jan 21, 2026
16382d9
Merge branch 'develop' into release/0.2.4
Feb 4, 2026
82c2c2c
Merge branch 'develop' into release/0.2.4
Feb 4, 2026
9a77b24
Merge pull request #231 from mskcc-omics-workflows/develop
nikhil Feb 5, 2026
9e9161e
Merge pull request #226 from mskcc-omics-workflows/release/0.2.4
buehlere Feb 5, 2026
83e2dc8
Fix FASTA header to preserve mutation identity through netMHCpan
johnoooh Feb 6, 2026
81acf71
Update generatemutfasta/1.2 test snapshots for identifier_key header
johnoooh Feb 6, 2026
0e81776
Use identifier_key with _M/_W suffix as sole FASTA header
johnoooh Feb 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 72 additions & 15 deletions .github/workflows/gitbook-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,31 @@ jobs:
fetch-depth: 2 # To retrieve the preceding commit.

- name: Combine all tags.yml files
id: get_tags
run: find . -name "tags.yml" -not -path "./.github/*" -exec cat {} + > .github/tags.yml
run: |
echo "{}" > .github/tags.yml

for f in $(find . -name "tags.yml" -not -path "./.github/*"); do
if [[ "$f" == *"/modules/"* ]]; then
PREFIX="modules"
elif [[ "$f" == *"/subworkflows/"* ]]; then
PREFIX="subworkflows"
else
echo "Unknown feature type for $f"
exit 1
fi

yq eval "
with_entries(
.key = \"${PREFIX}/\" + .key
)
" "$f" > /tmp/tags.prefixed.yml

yq eval-all '. as $item ireduce ({}; . *+ $item)' \
.github/tags.yml /tmp/tags.prefixed.yml > /tmp/tags.merged.yml

mv /tmp/tags.merged.yml .github/tags.yml
done


- name: debug
run: cat .github/tags.yml
Expand All @@ -67,6 +90,7 @@ jobs:
needs: [pytest-changes, nf-test-changes]
strategy:
fail-fast: false
max-parallel: 1
matrix:
tags:
[
Expand All @@ -85,28 +109,52 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10" # install the python version needed
- name: Install yq
run: sudo apt-get update && sudo apt-get install -y yq
- uses: actions/checkout@v4
with:
ref: docs
- name: Update name of ${{ matrix.tags }}
run: |
MATRIX_FRAGMENT="${{ matrix.tags }}"
TEMP_NAME=$(echo $MATRIX_FRAGMENT | sed 's/subworkflows\///g')
SW_NAME=$(echo $TEMP_NAME | sed 's/modules\///g')
SW_NAME=$(echo $TEMP_NAME | sed 's/modules\///g' | sed 's/\//\//')
echo "SW_NAME=$SW_NAME" >> $GITHUB_ENV
- name: Rename md file
id: replace_slash
run: |
FRAGMENT="${{ env.SW_NAME }}"
MD_NAME=$(echo $FRAGMENT | sed 's/\//_/g')
if [[ "$FRAGMENT" == *"/"* ]]; then
DIR="$(dirname "$FRAGMENT")"
BASE="$(basename "$FRAGMENT")"
MD_PATH="${DIR}/${DIR}_${BASE}"
else
MD_PATH="$FRAGMENT"
fi

echo "MD_PATH=$MD_PATH" >> $GITHUB_ENV
MD_NAME="${FRAGMENT}"

echo "MD_PATH=$MD_PATH" >> $GITHUB_ENV
echo "MD_NAME=$MD_NAME" >> $GITHUB_ENV
echo "${MD_NAME}"
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "pull changes before adding doc for ${{ matrix.tags }}"
pull: "--rebase"
cwd: "./"
- name: Ensure output folder exists and debug
run: |
echo "MD_PATH=${MD_PATH}"
echo "Creating folder: ./modules/$(dirname ${MD_PATH})"
mkdir -p ./modules/$(dirname ${MD_PATH})
ls -la ./modules
- name: Ensure parent README exists
run: |
DIR="$(dirname "$MD_PATH")"
if [ ! -f "./modules/$DIR/README.md" ]; then
echo "# $DIR" > "./modules/$DIR/README.md"
fi
- name: Download convertor from yml to md
run: |
curl -o ${{ github.workspace }}/yaml_to_md.py https://raw.githubusercontent.com/mskcc-omics-workflows/yaml_to_md/0.0.3/yaml_to_md.py
Expand Down Expand Up @@ -152,24 +200,33 @@ jobs:
echo "FEATURE_TYPE=$FEATURE_TYPE" >> $GITHUB_ENV
echo "SUMMARY_TYPE=$SUMMARY_TYPE" >> $GITHUB_ENV
echo "SUBWORKFLOW=$SUBWORKFLOW" >> $GITHUB_ENV

- name: Run convertor to generate md file for new module
run: |
echo ${{ matrix.tags }}
python ${{ github.workspace }}/yaml_to_md.py all --yaml-file ${{ github.workspace }}/temp.yml --output-file ./${{ env.FEATURE_TYPE }}/${{ env.MD_NAME }}.md --schema-url https://raw.githubusercontent.com/mskcc-omics-workflows/yaml_to_md/0.0.3/nextflow_schema/${{ env.FEATURE_TYPE }}/meta-schema.json ${{ env.SUBWORKFLOW }}
- name: Check file existence for modules
id: check_files
uses: andstor/file-existence-action@v1
with:
branch: docs
files: ${{ env.FEATURE_TYPE}}/${{ env.MD_NAME }}.md
mkdir -p ./${{ env.FEATURE_TYPE }}/$(dirname $MD_PATH)
python ${{ github.workspace }}/yaml_to_md.py all \
--yaml-file ${{ github.workspace }}/temp.yml \
--output-file ./${{ env.FEATURE_TYPE }}/${{ env.MD_PATH }}.md \
--schema-url https://raw.githubusercontent.com/mskcc-omics-workflows/yaml_to_md/0.0.3/nextflow_schema/${{ env.FEATURE_TYPE }}/meta-schema.json \
${{ env.SUBWORKFLOW }}
- name: Add to SUMMARY for new features
run: |
curl -o ${{ github.workspace }}/update_summary.py https://raw.githubusercontent.com/mskcc-omics-workflows/modules/develop/.github/workflows/update_summary.py
python ${{ github.workspace }}/update_summary.py SUMMARY.md "* [${{ env.MD_NAME }}](${{ env.FEATURE_TYPE }}/${{ env.MD_NAME }}.md)" ${{ env.SUMMARY_TYPE }} > tmp_summary.md
curl -o ${{ github.workspace }}/update_summary.py https://raw.githubusercontent.com/mskcc-omics-workflows/modules/release/0.2.4/.github/workflows/update_summary.py
python ${{ github.workspace }}/update_summary.py SUMMARY.md "${{ env.SW_NAME }}" ${{ env.SUMMARY_TYPE }} > tmp_summary.md
mv tmp_summary.md SUMMARY.md
- name: Check for changes
run: |
if git diff --quiet; then
echo "NO_CHANGES=true" >> $GITHUB_ENV
fi
- name: Stage new files
run: |
git add "./${{ env.FEATURE_TYPE }}/${{ env.MD_PATH }}.md"
git add SUMMARY.md
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "add doc for ${{ matrix.tags }}"
add: '["*/*.md --force", "SUMMARY.md --force"]'
cwd: "./"
push: --force
103 changes: 50 additions & 53 deletions .github/workflows/update_summary.py
Original file line number Diff line number Diff line change
@@ -1,81 +1,78 @@
import sys
from collections import defaultdict


def update_summary_old(origin: str, new_feature: str, feature_type: str):
out_summary = ""
with open(origin, 'r') as f:
for line in f.readlines():
if feature_type == "module" and line.startswith("## Subworkflows") and new_feature not in out_summary:
out_summary += new_feature + '\n\n'
if line.strip():
out_summary += line
if feature_type == "subworkflow" and new_feature not in out_summary:
out_summary += new_feature
return out_summary

def build_module_entry(module_id: str):
if "/" in module_id:
namespace, name = module_id.split("/", 1)
display = f"{namespace}_{name}"
path = f"modules/{namespace}/{namespace}_{name}.md"
parent = namespace
else:
display = module_id
path = f"modules/{module_id}.md"
parent = None
entry = f"* [{display}]({path})"
return entry, parent

def load_summary_file(origin: str):
# Read the summary file to dict
# keys, "Table of contents", "Modules", "Subworkflows"
# values are list of lines
sections = defaultdict(list)
current_section = None
with open(origin, "r") as file_read:
for row in file_read:
with open(origin, "r") as f:
for row in f:
if row.startswith("#"):
current_section = row.replace("#", "").strip()
continue
if row.strip():
sections[current_section].append(row)
sections[current_section].append(row.rstrip("\n"))
return sections


def add_new_feature(sections: dict, new_feature: str, feature_type: str):
new_list = []
found = False
if feature_type == "module":
# Check if the new feature is already in current summary file
if new_feature.replace("\\", "") in [line.strip().replace("\\", "") for line in sections["Modules"]]:
entry, parent = build_module_entry(new_feature)
module_lines = sections["Modules"]

# Check if entry already exists
existing_entries = [line.strip() for line in module_lines]
if entry in existing_entries or f" {entry}" in existing_entries:
return sections
# Get module name from [] and remove the _ part.
# Check if the first part of the module name exists
new_feature_category = new_feature.split("]")[0].split("_")[0].replace("* [", "").replace("\\", "").strip()
for line in sections["Modules"]:
new_list.append(line)
if f"[{new_feature_category}]" in line:
found = True
new_list.append(f" {new_feature}\n")
if not found:
# If not found, put the new feature to the last
new_list.append(new_feature + "\n\n")
sections["Modules"] = new_list

if feature_type == "subworkflow" and new_feature not in sections["Subworkflows"]:
# There is no subset of subworkflow, so put the new feature to the last
sections["Subworkflows"].append(new_feature + "\n")
return sections
if parent:
# Check if parent already exists
parent_line = f"* [{parent}](modules/{parent}/README.md)"
parent_indices = [i for i, line in enumerate(module_lines) if line.strip() == parent_line]
if parent_indices:
# Insert under existing parent
index = parent_indices[-1] + 1
module_lines.insert(index, f" {entry}")
else:
# Add parent at end if missing, then child
module_lines.append(parent_line)
module_lines.append(f" {entry}")
else:
module_lines.append(entry)

sections["Modules"] = module_lines

elif feature_type == "subworkflow":
if new_feature not in sections["Subworkflows"]:
sections["Subworkflows"].append(new_feature)
return sections

def rebuild_summary(origin: str, new_feature: str, feature_type: str):
# Load current summary file to dictionary
sections = load_summary_file(origin=origin)
# Add the new feature to summary file dict
updated_sections = add_new_feature(
sections=sections, new_feature=new_feature, feature_type=feature_type)
# Output the updated summary file to string
sections = load_summary_file(origin)
sections = add_new_feature(sections, new_feature, feature_type)

out_summary = "# Table of contents\n\n"
for line in updated_sections["Table of contents"]:
out_summary += line
for line in sections["Table of contents"]:
out_summary += f"{line}\n"
out_summary += "\n## Modules\n\n"
for line in updated_sections["Modules"]:
out_summary += line
for line in sections["Modules"]:
out_summary += f"{line}\n"
out_summary += "\n## Subworkflows\n\n"
for line in updated_sections["Subworkflows"]:
out_summary += line
for line in sections["Subworkflows"]:
out_summary += f"{line}\n"
return out_summary


if __name__ == "__main__":
origin_summary = sys.argv[1]
new_feature = sys.argv[2]
Expand Down
2 changes: 1 addition & 1 deletion modules/msk/calculatenoise/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- "YOUR-TOOL-HERE"
- "YOUR-TOOL=HERE"
6 changes: 3 additions & 3 deletions modules/msk/calculatenoise/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ tools:
homepage: "https://github.com/msk-access/sequence_qc"
documentation: "https://github.com/msk-access/sequence_qc"
tool_dev_url: "https://github.com/msk-access/sequence_qc"
doi: ""
doi: "no DOI available"
licence: ["MIT"]
identifier: null
identifier: ""

input:
- - meta:
Expand Down Expand Up @@ -141,4 +141,4 @@ output:
authors:
- "@mikefeixu"
maintainers:
- "@mikefeixu"
- "@mikefeixu"
8 changes: 4 additions & 4 deletions modules/msk/fgbio/collectduplexseqmetrics/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ keywords:
tools:
- "fgbio":
description: "A set of tools for working with genomic and high throughput sequencing data, including UMIs"
homepage: "None"
documentation: "None"
tool_dev_url: "None"
doi: ""
homepage: "https://github.com/fulcrumgenomics/fgbio"
documentation: "https://github.com/fulcrumgenomics/fgbio"
tool_dev_url: "https://github.com/fulcrumgenomics/fgbio"
doi: "no DOI available"
licence: ["MIT"]
identifier: biotools:fgbio

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,9 @@ def main():
n_missing_tx_id += 1

if len(mut.mt_altered_aa) > 5:
id_string = (
str(mut.maf_row["Transcript_ID"])
+ " Variant "
+ str(mut.maf_row["Chromosome"])
+ ":"
+ str(mut.maf_row["Start_Position"])
+ "-"
+ str(mut.maf_row["End_Position"])
+ " Ref:"
+ str(mut.maf_row["Reference_Allele"])
+ " Alt:"
+ str(mut.maf_row["Tumor_Seq_Allele2"])
)
out_fa.write(">" + id_string + "\n")
out_fa.write(">" + mut.identifier_key + "_M\n")
out_fa.write(mut.mt_altered_aa + "\n")
out_WT_fa.write(">" + id_string + "\n")
out_WT_fa.write(">" + mut.identifier_key + "_W\n")
out_WT_fa.write(mut.wt_altered_aa + "\n")

### write out WT/MT CDS + AA for debugging purposes
Expand Down
14 changes: 7 additions & 7 deletions modules/msk/generatemutfasta/1.2/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"id": "test",
"single_end": false
},
"test.MUT.sequences.fa:md5,dff338ec438ac75aa674b64ea8e26544"
"test.MUT.sequences.fa:md5,3d2ff66590a4329f9a24e03bdf84e0ab"
]
],
[
Expand All @@ -19,16 +19,16 @@
"id": "test",
"single_end": false
},
"test.WT.sequences.fa:md5,51415a40a725a16eaa8f5c51fa43799e"
"test.WT.sequences.fa:md5,4bfcfc4d29d01ddc4108f39350936228"
]
],
"test_generate_mut_fasta.log"
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.10.2"
"nextflow": "24.10.5"
},
"timestamp": "2026-01-28T15:30:02.572804474"
"timestamp": "2026-02-09T15:03:37.884362"
},
"generatemutfasta_1.2 - maf - fasta - stub": {
"content": [
Expand Down Expand Up @@ -96,9 +96,9 @@
}
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.2"
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-12-18T16:08:27.448965"
"timestamp": "2026-02-09T15:03:51.569621"
}
}