RahmanTeam / DECoN

49 stars 29 forks source link

makeCNVcalls.R failed #29

Open lmanchon opened 3 years ago

lmanchon commented 3 years ago

failed again with:

[1] "BEGIN makeCNVCalls.R" [1] "Processing sample: SRR6823378_recalibrated 1/5" Optimization of the choice of aggregate reference set, this process can take some time Number of selected bins: 10000 Now fitting the beta-binomial model on a data frame with 206472 rows : this step can take a few minutes. Now computing the likelihood for the different copy number states Error in CallCNVs(x = all.exons, transition.probability = trans_prob, : Chromosome, start and end vector must have the same lengths. Calls: CallCNVs -> CallCNVs In addition: Warning messages: 1: In aod::betabin(data = data.for.fit, formula = as.formula(formula), : The data set contains at least one line with weight = 0.

2: In aod::betabin(data = data.for.fit, formula = as.formula(formula), : The data set contains at least one line with weight = 0.

3: In aod::betabin(data = data.for.fit, formula = as.formula(formula), : The data set contains at least one line with weight = 0.

Execution halted

Kiran936 commented 2 years ago

Can you share your command and head of the input CustoExon file and First Step BED file..

Note: I am not a developer of this.. i could run without error,, i had errors bcz of input CustExon file

lmanchon commented 2 years ago

Rscript ./DECoN/Linux/ReadInBams.R --bams ./bamfiles --bed exome.bed --fasta Homo_sapiens_hg38.fasta Rscript ./DECoN/Linux/IdentifyFailures.R --Rdata DECoNBams.RData --mincorr .98 --mincov 100 --custom FALSE Rscript ./DECoN/Linux/makeCNVcalls.R --transProb 0.01 --Rdata DECoNBams.RData --plot All --exon exome.bed --custom TRUE --plotFolder out_F

more exome.bed chr1 69090 70008 chr1 450739 451678 chr1 685715 686654 chr1 925941 926013 chr1 930154 930336 chr1 931038 931089 chr1 935771 935896 chr1 939039 939129 chr1 939274 939460 chr1 941143 941306 chr1 942135 942251 chr1 942409 942488 chr1 942558 943058 chr1 943252 943377 chr1 943697 943808 chr1 943907 944153 chr1 944693 944800 chr1 945056 945146 chr1 945517 945653 chr1 946172 946286 chr1 946401 946545 chr1 948130 948232

Kiran936 commented 2 years ago

I see you are giving Custom True and your custom bed file do not have exon numbering on 4th Column with headers in makeCNVcalls step,

1) Intersect your exome bed with genes. in First step and pass it in ReadInBam, ( Chr Start End Gene ) 2) Make another exome/Custom number bed file Chr Start End Gene Exon.Number this must be passed in MakeCNVCalls step

lmanchon commented 2 years ago

this is my new bed file below and my .Rdata file in attachment

chr Start end Gene chr1 11868 12227 DDX11L1 chr1 12612 12721 DDX11L1 chr1 13220 14409 DDX11L1 chr1 14403 14501 WASH7P chr1 15004 15038 WASH7P chr1 15795 15947 WASH7P chr1 16606 16765 WASH7P chr1 16857 17055 WASH7P chr1 17232 17368 WASH7P chr1 17368 17436 MIR6859-1 chr1 17605 17742 WASH7P chr1 17914 18061 WASH7P chr1 18267 18366 WASH7P chr1 24737 24891 WASH7P chr1 29533 29570 WASH7P chr1 29553 30039 MIR1302-2HG chr1 30365 30503 MIR1302-2 chr1 30563 30667 MIR1302-2HG chr1 30975 31097 MIR1302-2HG chr1 34553 35174 FAM138A chr1 35276 35481 FAM138A chr1 35720 36081 FAM138A chr1 52472 53312 OR4G4P chr1 57597 57653 OR4G11P chr1 58699 58856 OR4G11P chr1 62915 64116 OR4G11P chr1 69054 70108 OR4F5 chr1 89294 91629 AL627309.1 chr1 89550 90050 AL627309.3 chr1 90286 91105 AL627309.3 DECoNBams.zip

Kiran936 commented 2 years ago

and create custom exon number file with same BED file as above.. Chr Start End Gene Cust.Exonumber then pass it to Make CNV Step

lmanchon commented 2 years ago

Exon.Number means the number of exons per gene, isn't it ?

Kiran936 commented 2 years ago

Chr Start End Gene Cust.ExonNo chr1 11873 12227 DDX11L1 1 chr1 12594 12721 DDX11L1 2 chr1 13402 14409 DDX11L1 3 chr1 14406 16765 WASH7P 1 chr1 14969 15038 WASH7P 2 chr1 15795 15947 WASH7P 3 chr1 16606 16765 WASH7P 4

Its exon numbering for each exon of gene.. if 18 Exons per gene,, then 1-18 exons numbers

lmanchon commented 2 years ago

ok, it is the position number of exon in gene

lmanchon commented 2 years ago

ok, it failed at first loop step in makeCNVcalls.R with:

Optimization of the choice of aggregate reference set, this process can take some time Number of selected bins: 10000 Now fitting the beta-binomial model on a data frame with 198253 rows : this step can take a few minutes. Now computing the likelihood for the different copy number states Error in CallCNVs(x = all.exons, transition.probability = trans_prob, : Chromosome, start and end vector must have the same lengths. In addition: Warning messages: 1: In aod::betabin(data = data.for.fit, formula = as.formula(formula), : The data set contains at least one line with weight = 0.

2: In aod::betabin(data = data.for.fit, formula = as.formula(formula), : The data set contains at least one line with weight = 0.

3: In aod::betabin(data = data.for.fit, formula = as.formula(formula), : The data set contains at least one line with weight = 0.

4: In aod::betabin(data = data.for.fit, formula = as.formula(formula), : The data set contains at least one line with weight = 0.

Kiran936 commented 2 years ago

Something is wrong with your CustomExon Bed file, either format or the numbering, also check chr naming from your BAM, and both of BED files from step1 and Custom Exon

Kiran936 commented 2 years ago

you can omit the custom exon file from MakeCNV,, thats an optional try without that