mskilab-org / fragCounter

GC and mappability corrected fragment coverage for paired end whole genome sequencing
MIT License
7 stars 11 forks source link

invalid class "BigWigFile" error when running frag with bundled example files #19

Open hillan141 opened 2 years ago

hillan141 commented 2 years ago

Thanks for supporting this R package. I installed fragCounter from github on Feb 4, 2022. Using that version, I ran the suggested test using the bundled test files:

/usr/local/lib/R/library/fragCounter/extdata# ./frag -b chr21.bam -d gcMAP21/ -w 200

The run failed with the trace pasted below.

Are there any troubleshooting or solution options to resolve this error?

/usr/local/lib/R/library/fragCounter/extdata# ./frag -b chr21.bam -d gcMAP21/ -w 200 
<snip>   
Calling samtools view  -f 0x02 -F 0x10 chr21.bam -q 1 | cut -f "3,4,9"  
Starting fragment count on chr21.bam with bin size 200 and min mapQ 1 and   insert size limit 10000 with midpoint set to TRUE  
Finished computing coverage, and making GRanges 
Finished acquiring coverage 
Loaded GC and mappability 
length cov is 15509063, length gc is 240650, length map is 240650 
Synced coverage, GC, and mappability 
Modified gc / mappability correction 
Converting to data.table 
Grouping intervals 
Defining 500 fold collapsed ranges 
Presegmenting at  100000  bp scale  
Aggregating coverage within levels  
Mono scale correction  
Correcting coverage at individual scales 
Correcting coverage at  200 bp scale, with 234722 intervals 
Quantile filtering response and covariates 
Response min quantile: 0 max quantile: 0 
Nominated 0 of 234722 data points for loess fitting 
Converting to GRanges 
Made GRanges 
Error in h(simpleError(msg, call)) :  
  error in evaluating the argument 'con' in selecting a method for function 'export': invalid class "BigWigFile" object: undefined class for slot "resource" ("characterORconnection") 
Calls: fragCounter ... <Anonymous> -> new -> initialize -> initialize -> validObject 
In addition: Warning messages: 
1: replacing previous import 'GenomicRanges::shift' by 'data.table::shift' when loading 'bamUtils'  
2: replacing previous import 'GenomicAlignments::second' by 'data.table::second' when loading 'bamUtils'  
3: replacing previous import 'GenomicAlignments::last' by 'data.table::last' when loading 'bamUtils'  
4: replacing previous import 'GenomicAlignments::first' by 'data.table::first' when loading 'bamUtils'  
5: closing unused connection 3 (chr21.bam)  
6: In value[[3L]](cond) : DNACopy error moving on without segmenting 
7: In FUN(as.data.frame(grs[[i]]), fields, seg = seg) : 
  Not enough samples for loess fitting - check to see if missing or truncated data? 
Execution halted