diffHiC preparePairs error
1
0
Entering edit mode
roladali ▴ 20
@roladali-9193
Last seen 8.3 years ago

Hello, 

I am trying to used diffhic to analyze my HiC data. I am getting an error when I use preparePairs:

 

preparePairs(samplename, hs.Dpn, file=paste(samplename, "h5", sep="."), dedup=TRUE, minq=10)

Error in (function (classes, fdef, mtable)  : 

  unable to find an inherited method for function ‘seqnames’ for signature ‘"NULL"’

 

I have made sure that hs.Dpn is a GRanges object with the proper cut sites. 

samplename is the name of the bam. I had tried to use the full path to the bam file but that did not work. I created a soft link to the file to avoid the full path but that didnt work. I copied the bam file to the current directory to avoid full paths or soft links but that didnt work either. 

I am assuming that the preparePairs method is not able to open the bam file correctly but I am not sure why. Please let me know what I am missing.

Thanks!

 

diffhic preparepairs • 1.2k views
ADD COMMENT
0
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 12 hours ago
The city by the bay

If you read the documentation, you'll see that preparePairs expects a pairParam object, not a GRanges object.

ADD COMMENT
0
Entering edit mode

Thank you for answering that so gracefully (instead of perhaps pointing out how stupid that was on my behalf ;)).
I am actually following the documentation and I did create the pair param object but typed in the wrong object. I did correct it but I got another error:

 preparePairs(samplename, hs.param.Dpn, file=paste(samplename, "h5", sep="."), dedup=TRUE, minq=10)

Error in preparePairs(samplename, hs.param.Dpn, file = paste(samplename,  : 

  conversion table should have length equal to the number of chromosomes

 

ADD REPLY
1
Entering edit mode

It means that there's more chromosomes in your fragment list than there are in the BAM file. Perhaps the function could be more forgiving; but for now, you'll have to manually remove the extra chromosomes.

ADD REPLY

Login before adding your answer.

Traffic: 615 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