diffHiC preparePairs error
Entering edit mode
roladali ▴ 20
Last seen 5.1 years ago


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.



diffhic preparepairs • 583 views
Entering edit mode
Aaron Lun ★ 27k
Last seen 1 hour ago
The city by the bay

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

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


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.


Login before adding your answer.

Traffic: 256 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6