diffHic:Fails to load bam file during preparePairs
3
0
Entering edit mode
@manjulathimma-11250
Last seen 4.9 years ago

Hi Aaron,

Hi After removing extra chromosomes, I have loaded my bam files.

But facing the following error.

Ago1 <- preparePairs("/Users/data//HiCMapped/Ago1_presplit_out_fixmate_nochrM_new.bam",hs.param,file="/Users/thimmamp/temp_tobe_deleted/HiCMapped/Ago1_diffhic.h5",dedup=TRUE,minq=10)
Error in preparePairs("/Users/data/HiCMapped/Ago1_presplit_out_fixmate_nochrM_new.bam",  :
  failed to open output file at './file3387852bd5/17_15'

diffhic • 666 views
ADD COMMENT
0
Entering edit mode
Aaron Lun ★ 27k
@alun
Last seen 1 hour ago
The city by the bay

What version of diffHic are you using? This seems like the bug that was caused by having too many file handles open; it should have been fixed in version 1.4.3.

ADD COMMENT
0
Entering edit mode
@manjulathimma-11250
Last seen 4.9 years ago

Thanks Aaron, I downloaded the latest version and this issue is fixed!

ADD COMMENT
0
Entering edit mode
@manjulathimma-11250
Last seen 4.9 years ago

Hi Aaron, I am trying to count interacting fragments in pre-defined regions.

But there seems to an error.

redata <- connectCounts(input, hs.param, regions=gene.body)
Error in connectCounts(input, hs.param, regions = gene.body) :
  chromosome present in regions and not in fragments
In addition: Warning message:
In connectCounts(input, hs.param, regions = gene.body) :
  stranded region ranges have no interpretation, coercing unstrandedness
> input
[1] "/Users/thimmamp/temp_tobe_deleted/HiCMapped/HepG2_trimmed.h5" "/Users/thimmamp/temp_tobe_deleted/HiCMapped/Ago1_trimmed.h5"

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 GenomicFeatures_1.24.5                  AnnotationDbi_1.34.4                    BiocInstaller_1.22.3                    diffHic_1.4.3                          
 [6] InteractionSet_1.0.4                    SummarizedExperiment_1.2.3              Biobase_2.32.0                          GenomicRanges_1.24.2                    GenomeInfoDb_1.8.3                     
[11] IRanges_2.6.1                           S4Vectors_0.10.2                        BiocGenerics_0.18.0                    

loaded via a namespace (and not attached):
 [1] edgeR_3.14.0            XVector_0.12.1          zlibbioc_1.18.0         GenomicAlignments_1.8.4 BiocParallel_1.6.3      BSgenome_1.40.1         lattice_0.20-33         tools_3.3.1            
 [9] grid_3.3.1              rhdf5_2.16.0            csaw_1.6.1              DBI_0.4-1               Rhtslib_1.4.3           Matrix_1.2-6            rtracklayer_1.32.2      bitops_1.0-6           
[17] biomaRt_2.28.0          RCurl_1.95-4.8          RSQLite_1.0.0           limma_3.28.17           Rsamtools_1.24.0        Biostrings_2.40.2       locfit_1.5-9.1          XML_3.98-1.4           
 

Would you please help me resolve this?

 

 

ADD COMMENT
1
Entering edit mode

This probably should go into a new question, but I'll answer it here. The problem is that you've got some intervals in regions that are on chromosomes that don't exist in hs.param$fragmentsdiffHic isn't quite sure what to do with those regions, hence it throws an error. The solution is to screen out these regions before supplying them to connectCounts. I guess the function could be more forgiving and do this automatically.

ADD REPLY

Login before adding your answer.

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