Skip to content

Make mutation and cluster plotting single sample compatible#166

Merged
whelena merged 17 commits intomainfrom
jieunoh-make-mutation-and-cluster-plotting-single-sample-compatible
Mar 14, 2025
Merged

Make mutation and cluster plotting single sample compatible#166
whelena merged 17 commits intomainfrom
jieunoh-make-mutation-and-cluster-plotting-single-sample-compatible

Conversation

@graceooh
Copy link
Copy Markdown
Contributor

@graceooh graceooh commented Nov 23, 2024

Description

create.ccf.summary.heatmap and create.cluster.heatmap could not handle single samples. This pull request fixes this issue. It also allows create.ccf.summary.heatmap to also plot monoclonal / single sample results without erroring out.

Closes #...

Pipeline Run Results

  • Case 1
    • sample:
    • input csv:
    • config:
    • output:
    • log:
  • Case 2
    • sample:
    • input csv:
    • config:
    • output:
    • log:

Analysis Results

  • Case 1
    • script:
    • command:
    • output:
  • Case 2
    • script:
    • command:
    • output:

Checklist

  • This PR does NOT contain Protected Health Information (PHI). A repo may need to be deleted if such data is uploaded.
    Disclosing PHI is a major problem1 - Even a small leak can be costly2.

  • This PR does NOT contain germline genetic data3, RNA-Seq, DNA methylation, microbiome or other molecular data4.

  • This PR does NOT contain other non-plain text files, such as: compressed files, images (e.g. .png, .jpeg), .pdf, .RData, .xlsx, .doc, .ppt, or other output files.

  To automatically exclude such files using a .gitignore file, see here for example.

  • I have read the code review guidelines and the code review best practice on GitHub check-list.

  • I have set up or verified the main branch protection rule following the github standards before opening this pull request.

  • The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].

  • I have added the major changes included in this pull request to the CHANGELOG.md under the next release version or unreleased, and updated the date.

Footnotes

  1. UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records

  2. The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records.

  3. Genetic information is considered PHI.
    Forensic assays can identify patients with as few as 21 SNPs

  4. RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity.

@graceooh graceooh requested review from dan-knight and whelena and removed request for whelena November 23, 2024 00:53
@graceooh graceooh marked this pull request as draft November 23, 2024 01:01
@graceooh graceooh marked this pull request as ready for review November 23, 2024 03:30
@whelena
Copy link
Copy Markdown
Collaborator

whelena commented Nov 25, 2024

@graceooh Can you please attach figures/file path to the single and multi sample plots generated?

Copy link
Copy Markdown
Collaborator

@whelena whelena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice bug fix, need to trim down to avoid unnecessary hardcoded parameters.

}

if (same.as.matrix) {
hm.args$yat <- 1.5
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For parameters added here (line 132 - 148), is everything necessary? Generally, we want to avoid hard coding project/user specific params

arr <- as.data.frame(arr)
colnames(arr) <- as.character(unique(DF$ID))

hm <- create.ccf.heatmap(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is somewhat redundant I think, especially since users can pass through the same.as.matrix and yat arguments to BPGs create.heatmap.

@whelena whelena changed the title Jieunoh make mutation and cluster plotting single sample compatible Make mutation and cluster plotting single sample compatible Nov 25, 2024
@whelena whelena self-requested a review February 24, 2025 19:17
distance.method = 'euclidean',
xaxis.lab = '',
xlab.label = 'SNVs',
yaxis.lab = colnames(x),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm understanding correctly, we can't use the result of colnames as a default argument here. This should be yaxis.lab = NULL, then set the default inside the function. Something like:

if (is.null(yaxis.lab)) {
    yaxis.lab <- colnames(x);
    }

@whelena whelena requested a review from dan-knight March 10, 2025 23:01
@whelena whelena merged commit 8e2f26e into main Mar 14, 2025
6 checks passed
@whelena whelena deleted the jieunoh-make-mutation-and-cluster-plotting-single-sample-compatible branch March 14, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants