morinlab / GAMBLR

Set of standardized functions to operate with genomic data
https://morinlab.github.io/GAMBLR/
MIT License
3 stars 2 forks source link

Revert "new line" #111

Closed rdmorin closed 2 years ago

rdmorin commented 2 years ago

This reverts commit 22b80a6.# Pull Request Checklists

Important: When opening a pull request, keep only the applicable checklist and delete all other sections.

Checklist for all PRs

Required

This can be checked and addressed by running check_functions.pl and responding to the prompts. Test your code after you do this.

Optional but preferred with PRs

Checklist for New Functions

Required

Example:

#' Use GISTIC2.0 scores output to reproduce maftools::chromoplot with more flexibility
#'
#' @param scores output file scores.gistic from the run of GISTIC2.0
#' @param genes_to_label optional. Provide a data frame of genes to label (if mutated). The first 3 columns must contain chromosome, start, and end coordinates. Another required column must contain gene names and be named `gene`. (truncated for example)
#' @param cutoff optional. Used to determine which regions to color as aberrant. Must be float in the range [0-1]. (truncated for example)

Example:

#' @return nothing
#' @export
#' @import tidyverse ggrepel

Checklist for changes to existing code

rdmorin commented 2 years ago

This PR includes an example of a bit of code that should be added to any function that attempts to load a local file. This should help provide a more useful error for users who are running GAMBLR remotely and have either not set up their config (or loaded it properly) or have forgotten to sync the data locally. The relevant chunk is below. Without this code, calling get_manta_sv() on a remote computer will fail with an error about a missing file.

    #check for missingness
    if(!file.exists(sv_file)){
      message("Cannot find file locally. If working remotely, perhaps you forgot to load your config (see below) or sync your files?")
      message('Sys.setenv(R_CONFIG_ACTIVE= "remote"')
    }    #check for missingness
    if(!file.exists(sv_file)){
      message("Cannot find file locally. If working remotely, perhaps you forgot to load your config (see below) or sync your files?")
      message('Sys.setenv(R_CONFIG_ACTIVE= "remote"')
    }
mattssca commented 2 years ago

I have resolved the merge conflict. Nothing worth mentioning, just some blank lines.

rdmorin commented 2 years ago

I didn't realize this PR hadn't been merged. I've added to it. Can the new commits be reviewed please?