problems with multiDiv in paleotree package - r

I am trying to use the package paleotree to build LTT plots, but I get the following error when I try to input my trees.
a=read.tree(file.choose()) # to choose newick/nexus file
multiDiv(a)
Error in multiDiv(a) : Data of Unknown Type
Does paleotools only take objects of class 'multiphylo' ? I converted the imput tree to class multiphylo, but it still gives the same error. Can anyone suggest how to go about it?

I'm the author of package paleotree. I think what is going on here is that you are passing a single tree to multiDiv, which is setup for analyzing lists of objects, each of which are converted to a diversity curve. You probably want phyloDiv() instead. I can't be certain without know more about your data.

Related

Error in upset_data : unused argument (nsets = 5) What could be causing this and how coul I fix the issue?

I am very new to R and I would like to make UpSet plot of peptides.
I have five lists (sets) in .txt format (ID_list_vysledok_pos_vs_healthy_files.txt, ID_list_vysledok_pos_neg_files.txt, ID_list_vysledok_New_vs_Old_collumn_files.txt, ID_list_vysledok_neg_vs_healthy_files.txt, ID_list_vysledok_Coated_vs_Liquid_junction_files.txt)
Each .txt file is just list of peptides in this format: List of peptides
I was following step by step instructions by this link : http://genomespot.blogspot.com/2017/09/upset-plots-as-replacement-to-venn.html
The code is working without problems until I want to make the graph with : upset(res2, nsets=5)
It gives me following error: Error in upset_data(data, intersect, mode = mode, encode_sets = encode_sets, : unused argument (nsets = 5)
The res2 dataframe looks like it should be looking to make this graph : View(res2)
I think the problem is trivial and sets may not be properly defined (but in the link I was following it is working), but I was not able to fix this...
I installed these libraries : library(plyr), library(reshape2), library(UpSetR)
Just to be sure I will provide the code (same as in link): Photo of code
Thank you for any suggestions.
It looks like you might be mixing up packages. You are trying to use upset_data function from ComplexUpset package, but passing nsets argument which works with upset from UpSetR package. I would recommend taking a closer look at which functions you use. If you want to use both UpSetR and ComplexUpset, you can distinguish them with ComplexUpset::upset and UpSetR::upset.

Plotting GTFS object routes with tidytransit in R

I need to plot General transit Feed Specification (GTFS) object routes and their frequencies. For this purpose I have run the following code from the package manual https://cran.r-project.org/web/packages/tidytransit/tidytransit.pdf
to get some practice. But although the code is taken from the manual, I do get the error below. Is there anyone who can clarify this issue and show me an alternative way to perform spatial analysis?
library(tidytransit)
local_gtfs_path <- system.file("extdata",
"google_transit_nyc_subway.zip",
package = "tidytransit")
nyc <- read_gtfs(local_gtfs_path,
local=TRUE)
plot(nyc)
Error in UseMethod("inner_join") :
no applicable method for 'inner_join' applied to an object of class "NULL"
thanks for posting this!
this happened because we made a change in the API and I think the docs you were looking at were out of sync. they should be up to date now. see http://tidytransit.r-transit.org/articles/introduction.html
also, we made a change so that the plot() function will work as specified in the old docs and in the new docs.

Large data.tree causes plot() to error

I'm trying to build an org chart from a data.frame in r using the data.tree package.
As far as i can tell i have constructed the tree correctly, but when I try to plot() the data.tree object (which print()s fine) I get an error:
abort(0) at jsStackTrace#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:5:22110
stackTrace#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:5:22258
abort#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:28:10656
nullFunc_iii#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:5:662065
a8#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:21:31634
iC#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:9:83383
aD#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:9:102098
uF#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:9:173805
pG#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:9:204484
xc#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:11:740
http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:28:403
ccallFunc#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:5:15982
http://localhost:30899/session/viewhtml2fdc215a4edd/lib/viz-0.3/viz.js:47:42
renderValue#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/grViz-binding-0.8.4/grViz.js:38:27
http://localhost:30899/session/viewhtml2fdc215a4edd/lib/htmlwidgets-0.7/htmlwidgets.js:625:30
forEach#[native code]
forEach#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/htmlwidgets-0.7/htmlwidgets.js:55:21
http://localhost:30899/session/viewhtml2fdc215a4edd/lib/htmlwidgets-0.7/htmlwidgets.js:551:14
forEach#[native code]
forEach#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/htmlwidgets-0.7/htmlwidgets.js:55:21
staticRender#http://localhost:30899/session/viewhtml2fdc215a4edd/lib/htmlwidgets-0.7/htmlwidgets.js:549:12
http://localhost:30899/session/viewhtml2fdc215a4edd/lib/htmlwidgets-0.7/htmlwidgets.js:638:38
Any ideas?
I have just started using the data.frame package a couple of days ago, but came across the same problem with some of my trees - print(tree) worked but plot(tree) gave a similar error message to yours. So far, I could always resolve the issue by removing special characters like single and double quotation marks from the input data. Thus, the plot function appears to be sensitive to certain symbols or special characters ... maybe a starting point for your search for a solution?

How to find object 'corhelp' in r

I'm having trouble locating the packages for corhelp in R. This is what I get.
AdjMatHARD=abs(corhelp[restConnectivity,restConnectivity])>0.65+0.0
# Error: object 'corhelp' not found
Assuming you're following the code from YEAST
Gene Co-expression Network Analysis R Tutorial, corhelp is a variable defined in the code
corhelp=cor(datExpr,use="pairwise.complete.obs")
just search that page for corhelp to find it.

Kindly check the R command

I am doing following in Cooccur library in R.
> fb<-read.table("Fb6_peaks.bed")
> f1<-read.table("F16_peaks.bed")
everything is ok with the first two commands and I can also display the data:
> fb
> f1
But when I give the next command as given below
> explore_pairs(c("fb", "f1"))
I get an error message:
Error in sum(sapply(tf1_s, score_sample, tf2_hits = tf2_s, hit_list = hit_l)) :
invalid 'type' (list) of argument
Could anyone suggest something?
Despite promising to release a version to the Bioconductor depository in the article the authors published over a year ago, they have still not delivered. The gz file that is attached to the article is not of a form that my installation recognizes. Your really should be corresponding with the authors for this question.
The nature of the error message suggests that the function is expecting a different data class. You should be looking at the specification for the arguments in the help(explore_pairs) file. If it is expecting 2 matrices, then wrapping data.matrix around the arguments may solve the problem, but if it is expecting a class created by one of that packages functions then you need to take the necessary step to construct the right objects.
The help file for explore_pairs does exist (at least in the MAN directory) and says the first argument should be a character vector with further provisos:
\arguments{
\item{factornames}{an vector of character strings, each naming a GFF-like
data frame containing the binding profile of a DNA-binding factor.
There is also a load utility, load_GFF, which I assume is designed for creation of such files.
Try rename your data frame:
names(fb)=c("seq","start","end")
Check the example datasets. The column names are as above. I set the names and it worked.

Resources