Hi guys;
I get an error when I following the GenomicRanges HOWTOs protocal (http://bioconductor.org/packages/devel/bioc/vignettes/GenomicRanges/inst/doc/GenomicRangesHOWTOs.pdf) to loading my GTF file or the package's extdata using the GenomicFeatures package on linux system. And I had tried to reinstall R and the package, but error was still been report. I also try to use the package on win's R, it's work!
I had compared the sessionInfo() between the win's R and the linux's R, the R version and the packages version are the same, the difference is just install on different system!!!
It's an bug for linux's R? Thanks For Any Help!!
Bests
Liang
The code, the error and sessionInfo() of the linux's R are as following:
> library(GenomicFeatures)
> gtffile=system.file("extdata","GTF_files","test.gtf",package="GenomicFeatures") ## test.gtf is the reference I want to use to counting the gene expression.
> txdb=makeTxDbFromGFF(gtffile,format="gtf")
Import genomic features from the file as a GRanges object ... Error in parseURI("") : cannot parse URI
> gff_file=system.file("extdata","GFF3_files","a.gff3",package="GenomicFeatures")
> gff_file
[1] "/lfs1/ST_PMO2015G/STN11023/software/R-3.2.2/library/GenomicFeatures/extdata/GFF3_files/a.gff3"
> txdb=makeTxDbFromGFF(gff_file,format="gff3")
Import genomic features from the file as a GRanges object ... Error in parseURI("") : cannot parse URI
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C
[3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915
[5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915
[7] LC_PAPER=en_US.iso885915 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] GenomicFeatures_1.22.6 AnnotationDbi_1.32.0 Biobase_2.30.0
[4] GenomicRanges_1.22.1 GenomeInfoDb_1.6.1 IRanges_2.4.5
[7] S4Vectors_0.8.4 BiocGenerics_0.16.1 BiocInstaller_1.20.1
loaded via a namespace (and not attached):
[1] XVector_0.10.0 zlibbioc_1.16.0
[3] GenomicAlignments_1.6.1 BiocParallel_1.4.0
[5] tools_3.2.2 SummarizedExperiment_1.0.1
[7] DBI_0.3.1 lambda.r_1.1.7
[9] futile.logger_1.4.1 rtracklayer_1.30.1
[11] futile.options_1.0.0 bitops_1.0-6
[13] RCurl_1.95-4.7 biomaRt_2.26.1
[15] RSQLite_1.0.0 Biostrings_2.38.2
[17] Rsamtools_1.22.0 XML_3.98-1.3
Hi,Herve. Thanks for your respone.
The test.gtf is the reference which I want to use to counting the genes expression in my analysis. So , it was invalid for you.
And I had tried again to loading the a.gff3, the error was stiil been reported.
The R verssion is 3.2.2, and I installed the GenomicFeatures by using biocLite("GenomicFeatures").
and the information of sessionInfo() as following:
>sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C
[3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915
[5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915
[7] LC_PAPER=en_US.iso885915 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] GenomicFeatures_1.22.6 AnnotationDbi_1.32.0 Biobase_2.30.0
[4] GenomicRanges_1.22.1 GenomeInfoDb_1.6.1 IRanges_2.4.4
[7] S4Vectors_0.8.3 BiocGenerics_0.16.1
loaded via a namespace (and not attached):
[1] XVector_0.10.0 zlibbioc_1.16.0
[3] GenomicAlignments_1.6.1 BiocParallel_1.4.0
[5] tools_3.2.2 SummarizedExperiment_1.0.1
[7] DBI_0.3.1 lambda.r_1.1.7
[9] futile.logger_1.4.1 rtracklayer_1.30.1
[11] futile.options_1.0.0 bitops_1.0-6
[13] RCurl_1.95-4.7 biomaRt_2.26.1
[15] RSQLite_1.0.0 Biostrings_2.38.2
[17] Rsamtools_1.22.0 XML_3.98-1.3
Bests
Liang
Hi,
system.file()
is for getting the path to a file that is included in a package. Usingsystem.file("extdata","GTF_files","test.gtf",package="GenomicFeatures")
to get the path to your owntest.gtf
file doesn't work because the file doesn't belong to the GenomicFeatures package. All you need to do is something like:Cheers,
H.
Hi,
Maybe I didn't express my means clearly. Sorry~
My question is that I can,t use the GenomicFeatures to read the gtf file on the off-line linux system, although I tried the file which provide by the software. But I can use the Function of GenomicFeatures on my windows computer, it work without any error, by using the same command and reading the file on the off-line linux system.
The test.gtf file I had stored at the GTF_file folder of the GenomicFeatures, and I open the file by the path which provide by the system.files(). So the error didn't make by system.files(), makeTxDbFromGFF() make it!
And I think it maybe as an bug of the GenomicFeatures or R software, because it work on the windows system, but not on the linux, using the same command and reading the same files.
Cheers,
Liang
test.gtf
file in theGTF_file
folder of the GenomicFeatures package is a very bad idea. Please never do that.test.gtf
file with something likegtffile <- "path/to/your/test.gtf"
. Do NOT usesystem.file()
for that.Thanks,
H.
Hi, Herve.
It's work by following your suggestion, any error hadn't been reported again. And I try the commands which read the a.gff3 file as same as the first time I used, it also work as normal. It make me puzzling!! But, any way, thanks for your helps.
Bests
Liang