ExpressionAnalysis / CNV_Radar

CNV Rapid Aberration Detection And Reporting
Other
10 stars 7 forks source link

ROI order error #12

Closed KasapovicS closed 3 years ago

KasapovicS commented 3 years ago

Hey all, I am working on Somatic CNV calling and wanted to try out CNV_Radar. I ran into some issues though while testing with a single sample.

I installed CNV_Radar locally, and ran following commands:

Rscript /opt/CNVRadar/bam2roi.r -b test_sorted.bam -d subset.bed -z >> bam2roi.log 2>&1

Rscript /opt/CNVRadar/CNV_Radar_create_control.r --directory /mnt/ -r _roiSummary.txt >> create_normal_cohort.log 2>&1

Here I actually used the one sample that I had to generate the cohort... maybe thats causing issues? both bam2roi.log and create_normal_cohort.log look good.

java -jar /usr/local/bin/snpEff/SnpSift.jar annotate /usr/local/bin/snpEff/db/GRCh38/dbSnp/All_20180418.vcf.gz subset.vcf > subset_annotated.vcf

Annotated VCF looks fine

bgzip subset_annotated.vcf

/opt/CNVRadar/CNV_Radar.r -c cnvradar_normal_cohort.RData -r subset_sorted_roiSummary.txt -v subset_annotated.vcf.gz -G

The error I get is : [2020-12-08 11:15:04] - ReadROI - ERROR - The control panel and supplied sample have divergent ROI order, please sort and try again

So now my question is, sort what? The txt summary file? I cant sort the .Rdata file. Did the error appear as I used the same sample to generate both normal control?

Anyone that could help? Thanks!

jkstrat commented 3 years ago

The specific error that you supplied results from one of two possible scenarios:

  1. The samples used for your reference panel come from different captures. Unfortunately the tool cannot create a reference panel from samples that had different library preparations. You would need to re-sequence the samples using the library prep kit that is going to be used on your target samples, or create the reference from only those samples that have the same library prep kit as the target samples.
  2. The order of the region of interests are different between the reference samples. Make sure that the bed file used to create the ROI summaries was sorted prior to running the script to create the reference panel and wasn't resorted during sample processing.

However, you do bring up another point. CNV Radar can't be run with just one sample. CNV Radar uses a reference panel of presumed copy neutral samples to set a baseline depth for each region of interest specified in your bed file. The reference panel needs to be composed of samples that will not be assessed for CNVs. Then you will use the reference panel as an input for when you call CNVs. Perhaps the flow diagram from the readme will help illustrate this a bit better (https://github.com/ExpressionAnalysis/CNV_Radar/raw/master/images/CNV%20Radar%20workflow.png).