SHZ66 / zinba

Automatically exported from code.google.com/p/zinba
1 stars 1 forks source link

basealigncount - *** caught segfault *** address (nil), cause 'memory not mapped' #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1) What operating system are you using?

ubuntu 12.04 64bit
r2.14 64bit

2) What error message was displayed?

Calculating counts at each base
Processing 56496355 reads
    Processing chr1..........
        Initializing length to 249250621
        5137456 reads mapped to chr1

 *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
 1: .C("baseAlignCounts", as.character(inputfile), as.character(outputfile),     as.character(twoBitFile), as.integer(extension), as.character(filetype),     as.integer(binary), PACKAGE = "zinba")
 2: basealigncount(inputfile = "Documents/test5.bed", outputfile = "Documents/zinbaoutput/277basealigncount.basecount",     extension = 151, filetype = "bed", twoBitFile = "Documents/zinba/hg19.2bit")

3) What was the exact command you used that resulted in the error?

> basealigncount(
+   inputfile='Documents/test5.bed', 
+   outputfile='Documents/zinbaoutput/277basealigncount.basecount',
+   extension=151, 
+   filetype='bed', 
+   twoBitFile='Documents/zinba/hg19.2bit')

4) Please copy and paste any additional screen output that resulted from
running the command

> sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] zinba_2.02.03
> basealigncount(
+   inputfile='Documents/test5.bed', 
+   outputfile='Documents/zinbaoutput/277basealigncount.basecount',
+   extension=151, 
+   filetype='bed', 
+   twoBitFile='Documents/zinba/hg19.2bit')
Loading required package: R.methodsS3
R.methodsS3 v1.2.2 (2010-11-17) successfully loaded. See ?R.methodsS3 for help.
Loading required package: R.oo
R.oo v1.9.3 (2012-03-18) successfully loaded. See ?R.oo for help.

Attaching package: ‘R.oo’

The following object(s) are masked from ‘package:R.methodsS3’:

    throw.default

The following object(s) are masked from ‘package:methods’:

    getClass, getClasses, getMethods

The following object(s) are masked from ‘package:base’:

    attach, detach, gc, load, save

R.utils v1.12.1 (2012-03-20) successfully loaded. See ?R.utils for help.

Attaching package: ‘R.utils’

The following object(s) are masked from ‘package:utils’:

    timestamp

The following object(s) are masked from ‘package:base’:

    cat, commandArgs, getOption, inherits, isOpen, lapply, parse,
    warnings

Importing reads from file /home/mikedesktop/Documents/test5.bed ....
    Reads are formatted as bed ....
    Extending reads by 151 bp....
        For chr1 length is 249250621
        For chr2 length is 243199373
        For chr3 length is 198022430
        For chr4 length is 191154276
        For chr5 length is 180915260
        For chr6 length is 171115067
        For chr7 length is 159138663
        For chrX length is 155270560
        For chr8 length is 146364022
        For chr9 length is 141213431
        For chr10 length is 135534747
        For chr11 length is 135006516
        For chr12 length is 133851895
        For chr13 length is 115169878
        For chr14 length is 107349540
        For chr15 length is 102531392
        For chr16 length is 90354753
        For chr17 length is 81195210
        For chr18 length is 78077248
        For chr20 length is 63025520
        For chrY length is 59373566
        For chr19 length is 59128983
        For chr22 length is 51304566
        For chr21 length is 48129895
        For chr6_ssto_hap7 length is 4928567
        For chr6_mcf_hap5 length is 4833398
        For chr6_cox_hap2 length is 4795371
        For chr6_mann_hap4 length is 4683263
        For chr6_apd_hap1 length is 4622290
        For chr6_qbl_hap6 length is 4611984
        For chr6_dbb_hap3 length is 4610396
        For chr17_ctg5_hap1 length is 1680828
        For chr4_ctg9_hap1 length is 590426
        For chr1_gl000192_random length is 547496
        For chrUn_gl000225 length is 211173
        For chr4_gl000194_random length is 191469
        For chr4_gl000193_random length is 189789
        For chr9_gl000200_random length is 187035
        For chrUn_gl000222 length is 186861
        For chrUn_gl000212 length is 186858
        For chr7_gl000195_random length is 182896
        For chrUn_gl000223 length is 180455
        For chrUn_gl000224 length is 179693
        For chrUn_gl000219 length is 179198
        For chr17_gl000205_random length is 174588
        For chrUn_gl000215 length is 172545
        For chrUn_gl000216 length is 172294
        For chrUn_gl000217 length is 172149
        For chr9_gl000199_random length is 169874
        For chrUn_gl000211 length is 166566
        For chrUn_gl000213 length is 164239
        For chrUn_gl000220 length is 161802
        For chrUn_gl000218 length is 161147
        For chr19_gl000209_random length is 159169
        For chrUn_gl000221 length is 155397
        For chrUn_gl000214 length is 137718
        For chrUn_gl000228 length is 129120
        For chrUn_gl000227 length is 128374
        For chr1_gl000191_random length is 106433
        For chr19_gl000208_random length is 92689
        For chr9_gl000198_random length is 90085
        For chr17_gl000204_random length is 81310
        For chrUn_gl000233 length is 45941
        For chrUn_gl000237 length is 45867
        For chrUn_gl000230 length is 43691
        For chrUn_gl000242 length is 43523
        For chrUn_gl000243 length is 43341
        For chrUn_gl000241 length is 42152
        For chrUn_gl000236 length is 41934
        For chrUn_gl000240 length is 41933
        For chr17_gl000206_random length is 41001
        For chrUn_gl000232 length is 40652
        For chrUn_gl000234 length is 40531
        For chr11_gl000202_random length is 40103
        For chrUn_gl000238 length is 39939
        For chrUn_gl000244 length is 39929
        For chrUn_gl000248 length is 39786
        For chr8_gl000196_random length is 38914
        For chrUn_gl000249 length is 38502
        For chrUn_gl000246 length is 38154
        For chr17_gl000203_random length is 37498
        For chr8_gl000197_random length is 37175
        For chrUn_gl000245 length is 36651
        For chrUn_gl000247 length is 36422
        For chr9_gl000201_random length is 36148
        For chrUn_gl000235 length is 34474
        For chrUn_gl000239 length is 33824
        For chr21_gl000210_random length is 27682
        For chrUn_gl000231 length is 27386
        For chrUn_gl000229 length is 19913
        For chrM length is 16571
        For chrUn_gl000226 length is 15008
        For chr18_gl000207_random length is 4262
        For chr18_gl000207_random length is 4262
    Importing bed formatted reads
    Skipped 0 reads
    Loaded 56496355 reads
    Sorting reads ...COMPLETE

also i removed all special characters from the string column in case that was a 
problem. 
head (test5.bed)
mikedesktop@mikedesktop-XPS-8300:~/Documents$ head test5
chr10   60635   60686   WTCHGc34061c277c3c2205c2593c23563cc1    29  +
chr10   60789   60836   WTCHGc34061c277c3c2205c2593c23563cc2    29  -
chr10   61194   61245   WTCHGc34061c277c3c2206c7742c21415cc1    22  +
chr10   61231   61282   WTCHGc34061c277c3c1308c5877c144552cc1   22  +
chr10   61295   61346   WTCHGc34061c277c3c2206c7742c21415cc2    22  -
chr10   61301   61352   WTCHGc34061c277c3c1308c5877c144552cc2   22  -
chr10   67325   67376   WTCHGc34061c277c3c1203c16546c136922cc1  30  +
chr10   67412   67450   WTCHGc34061c277c3c1203c16546c136922cc2  30  -
chr10   68389   68440   WTCHGc34061c277c3c1108c21164c97584cc2   25  +
chr10   68448   68499   WTCHGc34061c277c3c1108c21164c97584cc1   25  -

Also, run.zinba worked fine without refinepeaks (after adding a pretend 
location for the basealign count as mentioned by someone else) but it would be 
really great to be able to use refine peaks.

many thanks

Original issue reported on code.google.com by Mresc...@googlemail.com on 28 May 2012 at 10:41

GoogleCodeExporter commented 8 years ago
From reading other posts i'm guessing the problem is due to including multiple 
haplotypes which means the 1st column names cause problems. I'll remove the 
extra haplotypes, readjust nay dodgy names and hopefully it will work then. 

Original comment by Mresc...@googlemail.com on 2 Jun 2012 at 10:25

GoogleCodeExporter commented 8 years ago
I remapped with stampy using a reference genome without haplotypes, converted 
the sam files to bam files with samtools, sorted the bam files and retried, 
using the same .2bit file. However, i still get the same error. Also I noticed 
that in the output on screen the last chromosome is always duplicated. See 
above the chr18_gl000207_random is duplicated. Whichever chromosome is last 
appears to be duplicated. Not sure if this makes a difference. I might try 
remapping with bowtie and see if that makes a difference but otherwise i am 
stumped. 

Original comment by Mresc...@googlemail.com on 6 Jun 2012 at 9:58

GoogleCodeExporter commented 8 years ago
(bam files converted standard bed format using bamtobed)

Original comment by Mresc...@googlemail.com on 6 Jun 2012 at 9:59

GoogleCodeExporter commented 8 years ago
It seems as though the issue is occurring where the chromosome 1 results are 
being printed to file.  Is an empty file even created upon segfault, or nothing 
at all?

Original comment by homer...@gmail.com on 6 Jun 2012 at 11:42

GoogleCodeExporter commented 8 years ago
thanks. 

No output file is created. I've checked all the permissions on that directory 
and i've tried it with and without an actual empty file of the name specified. 

Original comment by Mresc...@googlemail.com on 7 Jun 2012 at 12:30

GoogleCodeExporter commented 8 years ago
Just wondering if there was any update on what you thought might be wrong?
The actual zinba function works fine with the data so its nearly there but it 
would be so wonderful to be able to use the refinepeaks function too. 

Original comment by Mresc...@googlemail.com on 11 Jun 2012 at 7:54

GoogleCodeExporter commented 8 years ago
I can't seem to pinpoint what the error could be, so if you could send me a 
subset of your mapped reads (from chr1 or a random sample of all reads) then 
I'll give it a run on my setup to see if I can reproduce the error.  You can 
send a compressed file to homeriq5@gmail.com and I will work on this

Original comment by homer...@gmail.com on 11 Jun 2012 at 8:01

GoogleCodeExporter commented 8 years ago
we are currently incorporating these issues into a new zinba version, check 
back soon for a comprehensive update

Original comment by homer...@gmail.com on 20 Nov 2012 at 8:54