genomation icon indicating copy to clipboard operation
genomation copied to clipboard

Bed file reading error with readTranscriptFeatures()

Open gladiagit opened this issue 6 years ago • 7 comments

The bed file is downloaded from UCSC. A previous version of the package (1.12) has no issues with reading it but 1.14 fails with the "error in rownames ... invalid rownames length" error . is there a fix for this ? image

gladiagit avatar Feb 13 '19 21:02 gladiagit

Can you send a reproducible example ?

On Wed 13. Feb 2019 at 22:08, gladiagit [email protected] wrote:

The bed file is downloaded from UCSC. A previous version of the package (1.12) has no issues with reading it but 1.14 fails with the "error in rownames ... invalid rownames length" error . is there a fix for this ? [image: image] https://user-images.githubusercontent.com/18578978/52743935-cf421c80-2fa0-11e9-89b2-7f225b48556b.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BIMSBbioinfo/genomation/issues/181, or mute the thread https://github.com/notifications/unsubscribe-auth/AAm9EeSS5d4fNtf2QZXMtOStVGwoQaf1ks5vNH7pgaJpZM4a6R3E .

-- Sent from mobile, excuse the brevity

al2na avatar Feb 13 '19 21:02 al2na

library(genomation) gene.obj<-readTranscriptFeatures("test.bed")

gladiagit avatar Feb 13 '19 21:02 gladiagit

Hi @gladiagit , Are you sure that your input file is in bed format? does it have a header? Could you share it with us or at least few first lines of it? I checked readTranscriptFeatures function with a bed file (genomation v1.14, R 3.5.1) and it's fine for me. Kasia

katwre avatar Feb 13 '19 21:02 katwre

The file doesn't have a header and it was downloaded from the genome browser under the BED format output. Github doesn't let me upload that file format so I've changed the extension. test.bed.txt

gladiagit avatar Feb 13 '19 21:02 gladiagit

I checked your bed file and it's totally fine for me.

> library(genomation)
Loading required package: grid
> readTranscriptFeatures("~/test.bed.txt")
Reading the table...
Calculating intron coordinates...
Calculating exon coordinates...
Calculating TSS coordinates...
Calculating promoter coordinates...
Outputting the final GRangesList...

GRangesList object of length 4:
$exons 
GRanges object with 716 ranges and 2 metadata columns:
        seqnames            ranges strand |     score         name
           <Rle>         <IRanges>  <Rle> | <numeric>  <character>
    [1]        1 88039087-88039214      - |         8 NM_001302773
    [2]        1 88041014-88041072      - |         7 NM_001302773
    [3]        1 88041452-88041552      - |         6 NM_001302773
    [4]        1 88041982-88042048      - |         5 NM_001302773
    [5]        1 88044404-88044751      - |         4 NM_001302773
    ...      ...               ...    ... .       ...          ...
  [712]        2 12324949-12325050      + |         1 NM_001009332
  [713]        2 12398481-12398639      + |         2 NM_001009332
  [714]        2 12425131-12425878      + |         3 NM_001009332
  [715]        2 12487798-12488092      + |         4 NM_001009332
  [716]        2 12488094-12488421      + |         5 NM_001009332

...
<3 more elements>
-------
seqinfo: 2 sequences from an unspecified genome; no seqlengths

I guess there is sth wrong with your input file Dependencies/oar3.1_refseq_nochr.bed

Cheers, Kasia

katwre avatar Feb 14 '19 15:02 katwre

I am getting the same error with a refseq file I downloaded from UCSC. looks and checks out to be a bed file. snippet_hg19.refseq.bed.txt

My Session Info sessionInfo.txt

methylnick avatar Feb 26 '19 01:02 methylnick

I am getting the same error with a refseq file I downloaded from UCSC. looks and checks out to be a bed file. snippet_hg19.refseq.bed.txt

My Session Info sessionInfo.txt

Hmmm, it would appear upgrading R has solved the issue.

R version 3.5.3 (2019-03-11) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14.3

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

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

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

other attached packages: [1] genomationData_1.14.0 genomation_1.14.0

loaded via a namespace (and not attached): [1] SummarizedExperiment_1.12.0 tidyselect_0.2.5 purrr_0.3.2
[4] reshape2_1.4.3 lattice_0.20-38 seqPattern_1.14.0
[7] colorspace_1.4-1 stats4_3.5.3 rtracklayer_1.42.2
[10] yaml_2.2.0 XML_3.98-1.19 rlang_0.3.2
[13] pillar_1.3.1 glue_1.3.1 BiocParallel_1.16.6
[16] BiocGenerics_0.28.0 matrixStats_0.54.0 GenomeInfoDbData_1.2.0
[19] plyr_1.8.4 stringr_1.4.0 zlibbioc_1.28.0
[22] Biostrings_2.50.2 munsell_0.5.0 gtable_0.2.0
[25] Biobase_2.42.0 IRanges_2.16.0 GenomeInfoDb_1.18.2
[28] parallel_3.5.3 Rcpp_1.0.1 KernSmooth_2.23-15
[31] readr_1.3.1 scales_1.0.0 BSgenome_1.50.0
[34] BiocManager_1.30.4 plotrix_3.7-4 DelayedArray_0.8.0
[37] S4Vectors_0.20.1 XVector_0.22.0 Rsamtools_1.34.1
[40] impute_1.56.0 ggplot2_3.1.0 hms_0.4.2
[43] stringi_1.4.3 dplyr_0.8.0.1 GenomicRanges_1.34.0
[46] tools_3.5.3 bitops_1.0-6 magrittr_1.5
[49] lazyeval_0.2.2 RCurl_1.95-4.12 tibble_2.1.1
[52] crayon_1.3.4 pkgconfig_2.0.2 Matrix_1.2-17
[55] gridBase_0.4-7 data.table_1.12.0 assertthat_0.2.1
[58] rstudioapi_0.10 R6_2.4.0 GenomicAlignments_1.18.1
[61] compiler_3.5.3

methylnick avatar Mar 25 '19 03:03 methylnick