Open CrazyHsu opened 4 years ago
Maybe there is something i don't know, i can execute the install_github("BMILAB/AStrap")
, but some issues were thrown out as below:
The downloaded source packages are in
‘/tmp/Rtmpjnnoy5/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
✔ checking for file ‘/tmp/Rtmpjnnoy5/remotes723133f84eeb/BMILAB-AStrap-55a79ce/DESCRIPTION’ ...
─ preparing ‘AStrap’:
✔ checking DESCRIPTION meta-information ...
Warning in file(con, "r") :
cannot open file 'man': No such file or directory
ERROR
computing Rd index failed:cannot open the connection
Error: Failed to install 'AStrap' from GitHub:
System command 'R' failed, exit status: 1, stdout + stderr:
E> * checking for file ‘/tmp/Rtmpjnnoy5/remotes723133f84eeb/BMILAB-AStrap-55a79ce/DESCRIPTION’ ... OK
E> * preparing ‘AStrap’:
E> * checking DESCRIPTION meta-information ... OK
E> Warning in file(con, "r") :
E> cannot open file 'man': No such file or directory
E> ERROR
E> computing Rd index failed:cannot open the connection
It seems like there is no man file or directory, can you figure out what the problem is?
Maybe there is something i don't know, i can execute the
install_github("BMILAB/AStrap")
, but some issues were thrown out as below:The downloaded source packages are in ‘/tmp/Rtmpjnnoy5/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done ✔ checking for file ‘/tmp/Rtmpjnnoy5/remotes723133f84eeb/BMILAB-AStrap-55a79ce/DESCRIPTION’ ... ─ preparing ‘AStrap’: ✔ checking DESCRIPTION meta-information ... Warning in file(con, "r") : cannot open file 'man': No such file or directory ERROR computing Rd index failed:cannot open the connection Error: Failed to install 'AStrap' from GitHub: System command 'R' failed, exit status: 1, stdout + stderr: E> * checking for file ‘/tmp/Rtmpjnnoy5/remotes723133f84eeb/BMILAB-AStrap-55a79ce/DESCRIPTION’ ... OK E> * preparing ‘AStrap’: E> * checking DESCRIPTION meta-information ... OK E> Warning in file(con, "r") : E> cannot open file 'man': No such file or directory E> ERROR E> computing Rd index failed:cannot open the connection
It seems like there is no man file or directory, can you figure out what the problem is?
Hi, Thanks for contacting. I have updated AStrap package, you can try to install it again using following command.
install.packages("devtools")
library(devtools)
install_github("BMILAB/AStrap")
library(AStrap)
In additaion, you can try local installation. First you need install all dependencies packages according to the "DESCRIPTION" file of Astrap.
Depends: R (>= 3.1.0), stringr, rtracklayer, igraph, BSgenome,
Biostrings, BioSeqClass, ROCR
Suggests: RWeka, Gviz, randomForest, adabag, e1071, ggplot2
>unzip AStrap-master.zip
>mv AStrap-master AStrap
>zip -r AStrap.zip AStrap
>install.packages("C:/Users/Downloads/AStrap/AStrap.zip", repos = NULL, type = "win.binary")
>library(AStrap)
You alse can find the raw code from this link https://github.com/nikou123456/Supplement. If you have questions, please let me know.
Best, Nikou
Besides,you may encounter the following problems about igraph package
Warning in install.packages :
installation of package ‘igraph’ had non-zero exit status
You can try to solve the problem like following command
install.packages("https://cran.r-project.org/bin/windows/contrib/r-devel-gcc8/igraph_1.2.4.2.zip",
repos = NULL, type = "win.binary")
#or
install.packages("https://cran.r-project.org/bin/windows/contrib/3.5/igraph_1.2.5.zip", repos = NULL, type = "win.binary")
I used a Chinese friend's computer to install using the following script
> install.packages("https://cran.r-project.org/bin/windows/contrib/3.5/igraph_1.2.5.zip", repos = NULL, type = "win.binary")
Installing package into ‘C:/Users/yec/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
> library(devtools)
载入需要的程辑包:usethis
> install_github("BMILAB/AStrap")
Downloading GitHub repo BMILAB/AStrap@master
Skipping 4 packages not available: rtracklayer, BSgenome, Biostrings, BioSeqClass
√ checking for file 'C:\Users\yec\AppData\Local\Temp\Rtmpw5JBiA\remotes19d82e1a2bd2\BMILAB-AStrap-6edb9fa/DESCRIPTION' ...
- preparing 'AStrap': (519ms)
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- looking to see if a 'data/datalist' file should be added
- building 'AStrap_0.1.0.tar.gz'
Installing package into ‘C:/Users/yec/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'AStrap' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'AStrap'
finding HTML links ... 好了
AStrap html
buildTrainModel html
extract_IsoSeq_ge html
extract_IsoSeq_tr html
getFeature html
plotAS html
plotAlign html
plotCluster html
plotGain html
plotROC html
reCluster html
readCDHIT html
readGMAP html
trimmGMAP html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (AStrap)
> library(AStrap)
载入需要的程辑包:stringr
载入需要的程辑包:rtracklayer
载入需要的程辑包:GenomicRanges
载入需要的程辑包:stats4
载入需要的程辑包:BiocGenerics
载入需要的程辑包:parallel
载入程辑包:‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min
载入需要的程辑包:S4Vectors
载入程辑包:‘S4Vectors’
The following object is masked from ‘package:base’:
expand.grid
载入需要的程辑包:IRanges
载入程辑包:‘IRanges’
The following object is masked from ‘package:grDevices’:
windows
载入需要的程辑包:GenomeInfoDb
载入需要的程辑包:igraph
载入程辑包:‘igraph’
The following objects are masked from ‘package:rtracklayer’:
blocks, path
The following object is masked from ‘package:GenomicRanges’:
union
The following object is masked from ‘package:IRanges’:
union
The following object is masked from ‘package:S4Vectors’:
union
The following objects are masked from ‘package:BiocGenerics’:
normalize, path, union
The following objects are masked from ‘package:stats’:
decompose, spectrum
The following object is masked from ‘package:base’:
union
载入需要的程辑包:BSgenome
载入需要的程辑包:Biostrings
载入需要的程辑包:XVector
载入程辑包:‘Biostrings’
The following object is masked from ‘package:base’:
strsplit
载入需要的程辑包:BioSeqClass
载入需要的程辑包:scatterplot3d
Registered S3 method overwritten by 'tree':
method from
print.tree cli
载入程辑包:‘BioSeqClass’
The following object is masked from ‘package:GenomicRanges’:
distance
The following object is masked from ‘package:IRanges’:
distance
载入需要的程辑包:ROCR
载入需要的程辑包:gplots
载入程辑包:‘gplots’
The following object is masked from ‘package:rtracklayer’:
space
The following object is masked from ‘package:IRanges’:
space
The following object is masked from ‘package:S4Vectors’:
space
The following object is masked from ‘package:stats’:
lowess
载入程辑包:‘ROCR’
The following object is masked from ‘package:BioSeqClass’:
performance
Hi, I had tried as you mentioned above. But my network still can't work smoothly with the command install_github("BMILAB/AStrap")
, so i turned to the local installation. But when i went to the step install.packages("C:/Users/Downloads/AStrap/AStrap.zip", repos = NULL, type = "win.binary")
, it failed as below:
> install.packages("AStrap.zip", repos = NULL, type = "win.binary")
Error in install.packages("AStrap.zip", repos = NULL, type = "win.binary") :
cannot install Windows binary packages on this platform
Can i install the AStrap with linux environment? Thanks!
Hi, I had tried as you mentioned above. But my network still can't work smoothly with the command
install_github("BMILAB/AStrap")
, so i turned to the local installation. But when i went to the stepinstall.packages("C:/Users/Downloads/AStrap/AStrap.zip", repos = NULL, type = "win.binary")
, it failed as below:> install.packages("AStrap.zip", repos = NULL, type = "win.binary") Error in install.packages("AStrap.zip", repos = NULL, type = "win.binary") : cannot install Windows binary packages on this platform
Can i install the AStrap with linux environment? Thanks!
Of course. AStrap can be successfully installed on Windows, Linux and macOS. If you wrok under Linux enrionment, you can try following command for local installation.
install.packages("/path/package.tar.gz", repo=NULL, type="source")
the type "win.binary" should be replaced by "source"
It's so sad that it failed again with the below exceptions:
> install.packages("AStrap-master.zip", repo=NULL, type="source")
Installing package into ‘/path/to/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
Error in rawToChar(block[seq_len(ns)]) :
embedded nul in string: 'PK\003\004\n\0\0\0\0\0\x91etP\0\0\0\0\0\0\0\0\0\0\0\0\016\0\t\0AStrap-master/UT\005\0\001"\035u^PK\003\004\n\0\0\0\b\0\x91etPRd\xf8\xba+\0\0\0Q\0\0\0\034\0\t\0AStrap-master/.gi'
Warning message:
In install.packages("AStrap-master.zip", repo = NULL, type = "source") :
installation of package ‘AStrap-master.zip’ had non-zero exit status
> install.packages("AStrap.zip", repo=NULL, type="source")
Installing package into ‘/path/to/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
Error in rawToChar(block[seq_len(ns)]) :
embedded nul in string: 'PK\003\004\n\0\0\0\0\0\x91\035uP\0\0\0\0\0\0\0\0\0\0\0\0\a\0\034\0AStrap/UT\t\0\003"\035u^v\xdav^ux\v\0\001\004\xea\003\0\0\004\xea\003\0\0PK\003\004\n\0\0\0\0\0\x91\035uP\0\0\0\0\0\0\0\0\0\0\0\0\f\0\034\0AStra'Warning message:
In install.packages("AStrap.zip", repo = NULL, type = "source") :
installation of package ‘AStrap.zip’ had non-zero exit status
And I tried install_github("BMILAB/AStrap")
, it worked without exceptions!!! This is really a strange network environment! Thanks for your patience~
It's so sad that it failed again with the below exceptions:
> install.packages("AStrap-master.zip", repo=NULL, type="source") Installing package into ‘/path/to/R/x86_64-pc-linux-gnu-library/3.5’ (as ‘lib’ is unspecified) Error in rawToChar(block[seq_len(ns)]) : embedded nul in string: 'PK\003\004\n\0\0\0\0\0\x91etP\0\0\0\0\0\0\0\0\0\0\0\0\016\0\t\0AStrap-master/UT\005\0\001"\035u^PK\003\004\n\0\0\0\b\0\x91etPRd\xf8\xba+\0\0\0Q\0\0\0\034\0\t\0AStrap-master/.gi' Warning message: In install.packages("AStrap-master.zip", repo = NULL, type = "source") : installation of package ‘AStrap-master.zip’ had non-zero exit status > install.packages("AStrap.zip", repo=NULL, type="source") Installing package into ‘/path/to/R/x86_64-pc-linux-gnu-library/3.5’ (as ‘lib’ is unspecified) Error in rawToChar(block[seq_len(ns)]) : embedded nul in string: 'PK\003\004\n\0\0\0\0\0\x91\035uP\0\0\0\0\0\0\0\0\0\0\0\0\a\0\034\0AStrap/UT\t\0\003"\035u^v\xdav^ux\v\0\001\004\xea\003\0\0\004\xea\003\0\0PK\003\004\n\0\0\0\0\0\x91\035uP\0\0\0\0\0\0\0\0\0\0\0\0\f\0\034\0AStra'Warning message: In install.packages("AStrap.zip", repo = NULL, type = "source") : installation of package ‘AStrap.zip’ had non-zero exit status
And I tried
install_github("BMILAB/AStrap")
, it worked without exceptions!!! This is really a strange network environment! Thanks for your patience~
These is another way to use AStrap functions. First, make sure you have installed all dependencies packages according to the "DESCRIPTION" file of AStrap
Depends: R (>= 3.1.0), stringr, rtracklayer, igraph, BSgenome,
Biostrings, BioSeqClass, ROCR
Suggests: RWeka, Gviz, randomForest, adabag, e1071, ggplot2
And then load these package
library(stringr)
...
library(rtracklayer)
Download the AStrap package on your local and unzip it. And then load AStrap functions
source("/path/AStrap/R/AStrap.R")
If you want to load example data, as in,
rice_model<- load("/path/AStrap/data/rice_model.Rdata")
#or
rice_model<- readRDS("/path/AStrap/data/rice_model.Rdata")
trSequence.path <- "path/AStrap/inst/extdata/example_TRsequence.fasta"
trSequence <- readDNAStringSet(trSequence.path,format = "fasta")
If you have questions, please let me know.
Best, Nikou
Hi, I had tried command lines as you mentioned above, it failed again owing to some unknown issues on my machine like rJava
can't be correctly install, etc. So I tried the default way to test the AStrap. Fortunately it ran smoothly, but after I typed plotAS(result$ASevent, id = 1)
, it turned out that 'Rplot.pdf' with no content: -rw-r--r-- 1 0 March 27 17:19 Rplots.pdf
. Can you figure out what the problem it is? Thank you!! BTW, my OS is linux~
Hi, I had tried command lines as you mentioned above, it failed again owing to some unknown issues on my machine like
rJava
can't be correctly install, etc. So I tried the default way to test the AStrap. Fortunately it ran smoothly, but after I typedplotAS(result$ASevent, id = 1)
, it turned out that 'Rplot.pdf' with no content:-rw-r--r-- 1 0 March 27 17:19 Rplots.pdf
. Can you figure out what the problem it is? Thank you!! BTW, my OS is linux~
Hi~ plotAS function is used to visualize the AS event (optional, not necessary). Have you successfully installed the Gviz package? Have you checked the result from AStrap function? Therefore, first confirm that the Gviz package is successfully installed, and second confirm that AStrap function has valid result. Everything goes smoothly based on example data. Besides, In order to check what cause this problem, you can run the raw code of plotAS step by step .
#' @title Plotting a AS event.
#'
#' @description Visualization of AS events of different AS types, including AltA, AltD,
#' ES, IR.
#'
#' @param ASevent A list of AS events.
#' @param id The ID of AS events.
#' @return This function retures a picture of AS event.
#' @examples
#' ##Load example data
#' load(system.file("data","sample_ASresult.Rdata",package = "AStrap"))
#' ##Visualization of AS events of different AS types
#' library(Gviz)
#' plotAS(result$ASevent, id = 1)
#' plotAS(result$ASevent, id = 7)
#' plotAS(result$ASevent, id = 13)
#' plotAS(result$ASevent, id = 21)
plotAS <- function(ASevent, id = 1) {
Sali <- unlist(str_extract_all(ASevent$Salign[id], "\\d+"))
alignNum <- length(Sali)
Slength <- ASevent$Slength[id]
Astart <- ASevent$Sstart[id]
Aend <- ASevent$Send[id]
Qname <- ASevent$Qid[id]
Sname <- ASevent$Sid[id]
AStype <- ASevent$prediction[id]
Seq <- unlist(str_extract_all(ASevent$spliceSeq[id], "\\w+"))
aTrack1 <- AnnotationTrack(start = c(Sali[seq(1, alignNum, 2)]),
end = c(Sali[seq(2, alignNum, 2)]),
chromosome = "chr1", strand = "+", col = "gray",
shape = c("smallArrow", "arrow"), fill = "deepskyblue1",
group = Qname, id = "Query", genome = "hg19", name = "Query")
aTrack2 <- AnnotationTrack(start = c(1),
end = c(Slength),
chromosome = "chr1", strand = "+", col = "gray",
shape = c("smallArrow","arrow"), fill = "deepskyblue1",
group = Sname, id = "Subject", genome = "hg19", name = "Subject")
aTrack3 <- AnnotationTrack(start = c(Astart, Aend),
end = c(Astart, Aend),
chromosome = "chr1", strand = "*", col = "gray",
shape = c("smallArrow","arrow"), fill = "gray",
group = AStype, id = c(Seq[1], Seq[2]), genome = "hg19", name = AStype)
plotTracks(list(aTrack1, aTrack3, aTrack2), groupAnnotation = "group",
shape = "box", just.group = "left", fontcolor.group = "black",
fontsize.group = 15, background.title = "lightcoral", featureAnnotation = "id",
fontcolor.feature = "deepskyblue1", fontsize.feature = 8)
}
Hi everyone, sorry about the installation issue. We have update the AStrap package and fixed the above problem. You can install the R package using the following commands on the R consol
install.packages("devtools")
library(devtools)
install_github("BMILAB/AStrap")
library(AStrap)
Hi! For me the installation via the R console as described in the documentation is still not working. Installed it now via the here suggested download and directly sourcing from the unzipped folder, but would be great if this could be fixed :)
Hi, I have some problems in installing AStrap using
install_github("BMILAB/AStrap")
which dues to slow network, can you give some advise for Chinese users?