cibiobcg / abemus Goto Github PK
View Code? Open in Web Editor NEWABEMUS: platform specific and data informed detection of somatic SNVs in cfDNA
ABEMUS: platform specific and data informed detection of somatic SNVs in cfDNA
Dear authors, I am encountering an issue while applying apply_scaling_factor with use.optimal.R = TRUE in ABEMUS. The error appears on most samples but not systematically. I manage to get the optimalR.tsv file for a few samples.
I get the following error:
in line 61 of apply_scaling_factor: tabindex[i,paste0("tabcalls_f3","_optimalR_used")] <- optR
Error in [<-.data.frame
(*tmp*
, i, paste0("tabcalls_f3", "_optimalR_used"), :
replacement has 2 rows, data has 1
This is due to the fact that I get 2 Ropt values instead of a single in those failing cases.
This looks like this is due to the fact tab_optimal_R has 2 entries for target_Mbp=4.40 and mean_coverage=200 (row ID 15 and 17). Why is that?
How to solve this issue?
Shall we remove this double option of scaling factor in tab_optimal_R?
Many thanks in advance for your help,
Kind regards,
Hanaé
tab_optimal_R
target_Mbp mean_coverage scalingfactor
6 0.04 200 1.1
7 0.04 500 1.1
8 0.04 1000 1.1
5 0.04 2000 1.1
10 0.20 200 1.2
11 0.20 500 1.1
12 0.20 1000 1.1
9 0.20 2000 1.2
18 0.40 200 1.2
19 0.40 500 1.1
20 0.40 1000 1.1
13 0.40 2000 1.2
26 1.10 200 1.2
27 1.10 500 1.1
28 1.10 1000 1.1
25 1.10 2000 1.2
34 2.10 200 1.2
35 2.10 500 1.1
36 2.10 1000 1.1
33 2.10 2000 1.1
15 4.40 200 1.4
17 4.40 200 1.2
16 4.40 500 1.1
14 4.40 2000 1.1
22 8.90 200 2.2
23 8.90 500 1.2
24 8.90 1000 1.3
21 8.90 2000 1.2
30 17.70 200 2.2
31 17.70 500 1.3
32 17.70 1000 1.4
29 17.70 2000 1.3
38 26.60 200 2.2
39 26.60 500 1.5
40 26.60 1000 1.4
37 26.60 2000 1.3
2 36.00 200 2.2
3 36.00 500 2.2
4 36.00 1000 1.4
1 36.00 2000 1.4
Please find below an example of the values of my variables used at this point of the function:
target_size
[1] 4.995
sizes
[1] 0.04 0.20 0.40 1.10 2.10 4.40 8.90 17.70 26.60 36.00
closest_target_size
[1] 4.4
bombanel
target_Mbp mean_coverage scalingfactor
15 4.4 200 1.4
17 4.4 200 1.2
16 4.4 500 1.1
14 4.4 2000 1.1
covs
[1] 200 200 500 2000
closest_coverage
[1] 200 200
optR
[1] 1.4 1.2
Hi there,
I am having issues in calling the "callsnvs" command. Error is:
Error in names(snvs) <- c("chr", "pos", "ref", "alt", "A", "C", "G", "T", : 'names' attribute [15] must be the same length as the vector [11]
I succeeded in all steps except this one. I write the commands I used here, so maybe someone can suggest a solution:
split_pacbam_bychrom(targetbed = args$regions, pacbamfolder = args$pacbamFolder, pacbamfolder_bychrom = args$pacbamByChromFolder)
perBaseErrorModel <- compute_pbem(sample.info.file = args$sampleInfo, targetbed = args$regions, outdir = args$outDir, pacbamfolder_bychrom = args$pacbamByChromFolder)
allelicFractionThresholds <- compute_afthreshold(outdir = args$outDir, pbem_dir = file.path(args$outDir,"BaseErrorModel"))
snvs <- callsnvs(sample.info.file = args$sampleInfo, controls_dir = file.path(args$outDir,"Controls"), pbem_dir = file.path(args$outDir,"BaseErrorModel"), detection.specificity = 0.995, replicas = 10, outdir = args$outDir, outdir.calls.name = "SNVs", targetbed = args$regions, pacbamfolder_bychrom =
args$pacbamByChromFolder)`
Structure of folders is correct and so the generated files. Any idea?
Thanks!
Hello,
The function callsnvs
threw this error:
Error in fread(input = tabpbem_file, stringsAsFactors = FALSE, showProgress = FALSE, :
input= must be a single character string containing a file name, a system command containing at least one space, a URL starting 'http[s]://', 'ftp[s]://' or 'file://', or, the input data itself containing at least one \n or \r
The problem is caused by filter.R
at line 108. Instead of
tabpbem_file = list.files(pbem_dir, pattern = paste0('bperr',chrom,'.tsv'),full.names = TRUE)
it should be
tabpbem_file = list.files(pbem_dir, pattern = paste0('bperr_chr',chrom,'.tsv'),full.names = TRUE)
The fix makes the function look for a file like bperr_chr1.tsv
instead of bperr_1.tsv
.
Kind regards,
Andrej
PS: I used hg38
as reference. I don't know how the files in outdir.bperr.name
get named when using hg19
.
Just working through test_example.R with R/4.0.2. Final steps to apply the pbem scaling factor to calls, doesn't output the optimalR tsv files? After calling the apply_scaling_factor(xxx) method, does one need to do something else? When heading the calls, e.g. head( calls$tabsnvs_index_scalfact ) the file paths are in the table but don't actually exist, see below. Any suggestions? Thanks
head( calls$tabsnvs_index_scalfact )
patient plasma germline
1 PT01 TUMOR_A CTRL_A
2 PT01 TUMOR_B CTRL_B
3 PT02 TUMOR_C CTRL_C
5 PT04 TUMOR_E
tabcalls_f1
1 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_A/pmtab_F1_TUMOR_A.tsv
2 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_B/pmtab_F1_TUMOR_B.tsv
3 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_C/pmtab_F1_TUMOR_C.tsv
5 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_E/pmtab_F1_TUMOR_E.tsv
tabcalls_f2
1 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_A/pmtab_F2_TUMOR_A.tsv
2 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_B/pmtab_F2_TUMOR_B.tsv
3 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_C/pmtab_F2_TUMOR_C.tsv
5 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_E/pmtab_F2_TUMOR_E.tsv
tabcalls_f3
1 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_A/pmtab_F3_TUMOR_A.tsv
2 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_B/pmtab_F3_TUMOR_B.tsv
3 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_C/pmtab_F3_TUMOR_C.tsv
5 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_E/pmtab_F3_TUMOR_E.tsv
case_mean_coverage
1 2286.657
2 2293.896
3 2285.669
5 2292.059
tabcalls_f3_optimalR
1 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_A/pmtab_F3_optimalR_TUMOR_A.tsv
2 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_B/pmtab_F3_optimalR_TUMOR_B.tsv
3 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_C/pmtab_F3_optimalR_TUMOR_C.tsv
5 /uufs/chpc.utah.edu/common/HIPAA/u0028003/Scratch/Underhill/Abemus/test_dataset_abemus//Results/TUMOR_E/pmtab_F3_optimalR_TUMOR_E.tsv
tabcalls_f3_optimalR_used
1 1.1
2 1.1
3 1.1
5 1.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.