Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
Change Log
==========

3.12.0
=====
* Add Kinnex alignment MetaWorkflowRun creation function for SMaHT


3.11.0
=====
* Most MetaWorkflowRun creation functions now accept multiple files or filesets as input.
* Added `archive_broad_crams_and_fastqs` function to `wrangler_utils` to archive Broad submissions more easily.
* Added `purge_fileset` function to `wrangler_utils` to delete a fileset and its associated files.
* Added `remove_property` function to `wrangler_utils` to remove properties from items.


3.10.0
=====
* Added functionality to rerun a MetaWorkflowRun with imported steps from a previous run
Expand Down
26 changes: 26 additions & 0 deletions magma_smaht/commands/create_meta_workflow_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from magma_smaht.create_metawfr import (
mwfr_illumina_alignment,
mwfr_rnaseq_alignment,
mwfr_kinnex_alignment,
mwfr_pacbio_alignment,
mwfr_fastqc,
mwfr_hic_alignment,
Expand Down Expand Up @@ -91,6 +92,31 @@ def align_rnaseq(fileset_accessions, sequence_length, auth_env):
mwfr_rnaseq_alignment(fileset_accession, sequence_length, smaht_key)


@cli.command()
@click.help_option("--help", "-h")
@click.option(
"-f",
"--fileset-accessions",
required=True,
multiple=True,
type=str,
help="Fileset accessions",
)
@click.option(
"-e",
"--auth-env",
required=True,
type=str,
help="Name of environment in smaht-keys file",
)
def align_kinnex(fileset_accessions, auth_env):
"""Alignment MWFR for Kinnex data"""
smaht_key = get_auth_key(auth_env)
for fileset_accession in fileset_accessions:
print(f"Working on Fileset {fileset_accession}")
mwfr_kinnex_alignment(fileset_accession, smaht_key)


@cli.command()
@click.help_option("--help", "-h")
@click.option(
Expand Down
3 changes: 2 additions & 1 deletion magma_smaht/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
# MetaWorkflow names are used to get the latest version.
# We assume that they don't change!
MWF_NAME_ILLUMINA = "Illumina_alignment_GRCh38"
MWF_NAME_RNASEQ = "RNA-seq_bulk_short_reads_GRCh38"
MWF_NAME_ONT = "ONT_alignment_GRCh38"
MWF_NAME_PACBIO = "PacBio_alignment_GRCh38"
MWF_NAME_RNASEQ = "RNA-seq_bulk_short_reads_GRCh38"
MWF_NAME_KINNEX = "RNA-seq_kinnex_long_reads_GRCh38"
MWF_NAME_HIC = "Hi-C_alignment_GRCh38"
MWF_NAME_FASTQC = "Illumina_FASTQ_quality_metrics"
MWF_NAME_FASTQ_LONG_READ = "long_reads_FASTQ_quality_metrics"
Expand Down
12 changes: 12 additions & 0 deletions magma_smaht/create_metawfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from magma_smaht.constants import (
MWF_NAME_ILLUMINA,
MWF_NAME_RNASEQ,
MWF_NAME_KINNEX,
MWF_NAME_ONT,
MWF_NAME_PACBIO,
MWF_NAME_HIC,
Expand Down Expand Up @@ -145,6 +146,17 @@ def mwfr_rnaseq_alignment(fileset_accession, sequence_length, smaht_key):
)


def mwfr_kinnex_alignment(fileset_accession, smaht_key):
"""Creates a MetaWorflowRun item in the portal for the Kinnex pipeline given a fileset"""

mwf = get_latest_mwf(MWF_NAME_KINNEX, smaht_key)
print(f"Using MetaWorkflow {mwf[ACCESSION]} ({mwf[ALIASES][0]})")

file_set = get_file_set(fileset_accession, smaht_key)
mwfr_input = get_core_alignment_mwfr_input(file_set, INPUT_FILES_BAM, smaht_key)
create_and_post_mwfr(mwf[UUID], file_set, INPUT_FILES_BAM, mwfr_input, smaht_key)


def mwfr_pacbio_alignment(fileset_accession, smaht_key):
"""Creates a MetaWorflowRun item in the portal for PacBio alignment of submitted files within a fileset"""

Expand Down
1 change: 1 addition & 0 deletions magma_smaht/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def get_latest_mwf(mwf_name, smaht_key):
Returns:
dict: MWF item from portal
"""
#query = f"/search/?type=MetaWorkflow&version=0.3.0&name={mwf_name}"
query = f"/search/?type=MetaWorkflow&name={mwf_name}"
search_results = ff_utils.search_metadata(query, key=smaht_key)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "magma-suite"
version = "3.11.0"
version = "3.12.0"
description = "Collection of tools to manage meta-workflows automation."
authors = ["Michele Berselli <[email protected]>", "Doug Rioux", "Soo Lee", "CGAP team"]
license = "MIT"
Expand Down