diffHic preparePairs function
1
0
Entering edit mode
lwtan90 • 0
@lwtan90-11145
Last seen 8.4 years ago

Hi,

I am trying to read my name-sorted bam file using preparePairs function.

mm.frag = cutGenome(BSgenome.Mmusculus.UCSC.mm9,"GATC",4)
preparePairs("smaller_sorted.bam",mm.param,'CMH059.h5')

I am getting this error: "Error in chromosomes[[chrs[x]]] : subscript out of bounds"

Can anyone shed lights on this?

 

Wilson

diffHic • 1.2k views
ADD COMMENT
0
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 10 minutes ago
The city by the bay

There are two issues here:

  • Make sure you're using the latest version of diffHic (1.4.2). That particular bit of code in your error message shouldn't exist anymore, unless I'm forgetting something that I did.
  • It's likely that the chromosome list in mm.frag is not the same as the chromosome list in your BAM file. This will cause the function to crash as, obviously, reads cannot be assigned to restriction fragments on chromosomes that have not been listed. You should run cutGenome on the FASTA files used to construct the mapping index that you used to make "smaller_sorted.bam". (The reason that I can use cutGenome on a BSgenome object in the user's guide is because my BAM files are always aligned against an index constructed directly from the BSgenome sequences.)

I also assume that you've constructed mm.param from mm.frag, otherwise it would appear out of nowhere.

ADD COMMENT

Login before adding your answer.

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