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

Issue with running battenberg #141

Open
gaitat opened this issue Dec 7, 2024 · 1 comment
Open

Issue with running battenberg #141

gaitat opened this issue Dec 7, 2024 · 1 comment

Comments

@gaitat
Copy link

gaitat commented Dec 7, 2024

I have R v4.2.2 and I installed Battenberg v2.2.10 using

R -q -e 'BiocManager::install(c("devtools", "splines", "readr", "doParallel", "ggplot2", "RColorBrewer", "gridExtra", "gtools", "parallel", "igordot/copynumber", "VariantAnnotation"))'
R -q -e 'devtools::install_github("Wedge-lab/battenberg")'

I have downloaded the hg38 reference files and unzipped the *_chr.zip files as my data contains the chr prefix.

I have copied the battenberg_wgs.R from the installation to my working directory.
I had to modify the entry

# from
        G1000LOCIPREFIX = file.path(BEAGLE_BASEDIR, "1000G_loci_hg38/1kg.phase3.v5a_GRCh38nounref_loci_chr")
# to
        G1000LOCIPREFIX = file.path(BEAGLE_BASEDIR, "1000G_loci_hg38/1kg.phase3.v5a_GRCh38nounref_loci_")

as otherwise allelecounting would not run.
I changed the analysis to paired as I have tumor/normal pairs and also supplied the correct path to ALLELECOUNTER

My script for running the algorithm is pretty simple:

#!/usr/bin/env bash

tumorName=$1
tumorFile=$2
normalName=$3
normalFile=$4

mkdir -p $tumorName

Rscript battenberg_wgs.R \
  --tumourname $tumorName \
  --tb $tumorFile \
  --normalname $normalName \
  --nb $normalFile \
  --sex female \ # I am actually not sure about this
  --output $tumorName \
  --cpu 24

exit 0

After allele counting is done, the files written to my output folder have the format (note the double chr)

51328 -rw-rw-r-- 1 user group 52522894 Dec  7 12:06 TCGA-24-0982-01A_alleleFrequencies_chrchr1.txt
55040 -rw-rw-r-- 1 user group 56313535 Dec  7 12:13 TCGA-24-0982-10C_alleleFrequencies_chrchr1.txt

And then I get the error message:

Error in `[.data.frame`(allele_data, , 1) : undefined columns selected
Calls: battenberg ... prepare_wgs -> getBAFsAndLogRs -> paste -> [ -> [.data.frame
Execution halted

Any help would be greatly appreciated.

@gaitat
Copy link
Author

gaitat commented Dec 7, 2024

Update: After installing the 'dev' branch, I get the same error message and more:

Error in `[.data.frame`(allele_data, , 1) : undefined columns selected
Calls: battenberg ... getBAFsAndLogRs -> gsub -> is.factor -> [ -> [.data.frame
Execution halted
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> ... doTryCatch -> recvData -> recvData.SOCKnode -> unserialize
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> ... doTryCatch -> recvData -> recvData.SOCKnode -> unserialize
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> ... doTryCatch -> recvData -> recvData.SOCKnode -> unserialize
Execution halted

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

1 participant