CNV Calling- CopywriteR
1
0
Entering edit mode
6.9 years ago
julia • 0

Hello,

I am trying to perform CNV calling on two BAM files. I entered:

CopywriteR(sample.control = sample.control,
+ destination.folder = file.path(data.folder),
+ reference.folder = file.path(data.folder, "hg38_20kb"),
+ bp.param = bp.param, capture.regions.file="ngCGH_genomic_loci.bed")

It then said that the following samples will be analyzed, however after some time I receive this error message:

Error: BiocParallel errors
  element index: 1, 2
  first error: seqlevels(param) not in BAM header:
    seqlevels: '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', 'X', 'Y'
    file: sorted_aln_pe_tumor_properreads.bam
    index: sorted_aln_pe_tumor_properreads.bam

I am not sure how to resolve the error, and was hoping someone on here would have some suggestions.

Thanks,

Julia

Rstudio CopyWriteR BAM • 2.7k views
ADD COMMENT
1
Entering edit mode

I think there is issue with chromosome naming, can you please show the bam header samtools view -H your_bam_file.bam

also check how they are named in the refernce I think they will be named ch1, ch2 ....

ADD REPLY
0
Entering edit mode

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

ADD REPLY
0
Entering edit mode

I resolved the problem by mannually modify the blacklist.rda and GC_mappability.rda in following command. This lead to match "chr" definition in hg19. However, in plotCNV step, I encountered another problem that not all the .bam (control files) were processed by CopewriteR. I don't know what's the problem then.

outDir<-"."
binSize<-20000
refGeno<-"hg19"

outHelperDir<-paste(refGeno,"_",binSize/1000,"kb",sep="")
load(file.path(outDir,outHelperDir,"blacklist.rda"))
load(file.path(outDir,outHelperDir,"GC_mappability.rda"))
seqlevels(blacklist.grange)<-paste("chr",seqlevels(blacklist.grange),sep="")
seqlevels(GC.mappa.grange)<-paste("chr",seqlevels(GC.mappa.grange),sep="")
save(blacklist.grange,file.path(outDir,outHelperDir,"blacklist.rda"))
save(GC.mappa.grange,file.path(outDir,outHelperDir,"GC_mappability.rda"))
ADD REPLY
2
Entering edit mode
6.7 years ago
heshiy88 ▴ 20

you can add a parameter prefix = "chr",at the preCopywriteR step to avoid this problem.

ADD COMMENT

Login before adding your answer.

Traffic: 2678 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6