Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused Arguments Error when running battenberg_wgs.R #112

Closed
parth2608 opened this issue Oct 3, 2023 · 6 comments
Closed

Unused Arguments Error when running battenberg_wgs.R #112

parth2608 opened this issue Oct 3, 2023 · 6 comments
Assignees

Comments

@parth2608
Copy link

When I try to run the battenberg_wgs.R script on my tumor-only wgs bam files, I get the following error:

library(Battenberg)
setwd("/wgs/battenberg")

Error in battenberg(analysis = "cell_line", samplename = "hTERT_RPE1", :
unused arguments (samplename = "hTERT_RPE1", sample_data_file = "/wgs/bams/1645XD-247-02-S25.recal.bam", genomebuild = "hg38")
Execution halted

@a3schiller
Copy link

Hi @parth2608!

I have a similar problem with unused arguments. Did you solve this?

Best,
Alice

@jcesar101 jcesar101 reopened this Feb 13, 2024
@jcesar101
Copy link
Contributor

Hi,

could you please confirm what version of Battenberg was used when getting this error?

@a3schiller
Copy link

Hi,

I am using the latest version in the development branch!

This is the error message that I get:

`Error in battenberg(analysis = analysis, tumourname = TUMOURNAME, normalname = NORMALNAME,  :
  unused arguments (tumourname = TUMOURNAME, tumour_data_file = TUMOURBAM, GENOMEBUILD = GENOMEBUILD)
Execution halted`

@jcesar101
Copy link
Contributor

jcesar101 commented Feb 13, 2024

Thank you for your prompt reply. In that version of Battenberg the name of the tumourname and tumour_data_file parameters changed to samplename and sample_data_file, respectively:

...
#' @param samplename Sample identifier (tumour or germline), this is used as a prefix for the output files. If allele counts are supplied separately, they are expected to have this identifier as prefix.
#' @param normalname Matched normal identifier, this is used as a prefix for the output files. If allele counts are supplied separately, they are expected to have this identifier as prefix.
#' @param sample_data_file A BAM or CEL file for the sample
#' @param normal_data_file A BAM or CEL file for the normal-pair (paired analysis)
...

There are also new optional parameters for enhanced functionality. We are currently working in updating the documentation and wrapping up the next Battenberg release. In the meantime, we greatly appreciate your patience and understanding.

@jcesar101 jcesar101 self-assigned this Feb 13, 2024
@a3schiller
Copy link

Thanks for your quick reply!

Is there an updated Battenberg_wgs.R available for this change?

The option list in the current file is:

option_list = list(
  make_option(c("-a", "--analysis_type"), type="character", default="paired", help="Type of analysis to run: paired (tumour+normal), cell_line (only tumour), germline (only normal)", metavar="character"),
  make_option(c("-t", "--tumourname"), type="character", default=NULL, help="Samplename of the tumour", metavar="character"),
  make_option(c("-n", "--normalname"), type="character", default=NULL, help="Samplename of the normal", metavar="character"),
  make_option(c("--tb"), type="character", default=NULL, help="Tumour BAM file", metavar="character"),
  make_option(c("--nb"), type="character", default=NULL, help="Normal BAM file", metavar="character"),
  make_option(c("--sex"), type="character", default=NULL, help="Sex of the sample", metavar="character"),
  make_option(c("-o", "--output"), type="character", default=NULL, help="Directory where output will be written", metavar="character"),
  make_option(c("--skip_allelecount"), type="logical", default=FALSE, action="store_true", help="Provide when alleles don't have to be counted. This expects allelecount files on disk", metavar="character"),
  make_option(c("--skip_preprocessing"), type="logical", default=FALSE, action="store_true", help="Provide when pre-processing has previously completed. This expects the files on disk", metavar="character"),
  make_option(c("--skip_phasing"), type="logical", default=FALSE, action="store_true", help="Provide when phasing has previously completed. This expects the files on disk", metavar="character"),
  make_option(c("--cpu"), type="numeric", default=8, help="The number of CPU cores to be used by the pipeline (Default: 8)", metavar="character"),
  make_option(c("--bp"), type="character", default=NULL, help="Optional two column file (chromosome and position) specifying prior breakpoints to be used during segmentation", metavar="character"),
  make_option(c("-g", "--ref_genome_build"), type="character", default="hg19", help="Reference genome build to which the reads have been aligned. Options are hg19 and hg38", metavar="character")
)

Thank you for your great work with Battenberg!

@jcesar101
Copy link
Contributor

The updated battenberg_wgs.R is now available in the dev branch:

https://github.com/Wedge-lab/battenberg/blob/34cdd8d02f8b6ac684447216178bb0cd856e35ef/inst/example/battenberg_wgs.R

Thank you.

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

No branches or pull requests

3 participants