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!
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
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.