Code Monkey home page Code Monkey logo

codeandroll2's People

Contributors

vertesy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

codeandroll2's Issues

symdiff does not reliably find differences!

Buggy Behavior

  • If you do not subset to unique, it does not find the difference
> symdiff(unique(obj.CHOOSE.full$celltype_ctrl_transfer_coarse), unique(obj.CHOOSE.full$celltype_ctrl_transfer))
$`Only in unique(obj.CHOOSE.full$celltype_ctrl_transfer_coarse)`
character(0)

$`Only in unique(obj.CHOOSE.full$celltype_ctrl_transfer)`
[1] "OPC"

> f$symdiff
[1] "CodeAndRoll2"
> symdiff(obj.CHOOSE.full$celltype_ctrl_transfer_coarse, obj.CHOOSE.full$celltype_ctrl_transfer)
$`Only in obj.CHOOSE.full$celltype_ctrl_transfer_coarse`
character(0)

$`Only in obj.CHOOSE.full$celltype_ctrl_transfer`
character(0)

In

> obj.CHOOSE.full
An object of class Seurat 
38411 features across 49754 samples within 6 assays 
Active assay: RNA (33850 features, 2000 variable features)
 3 layers present: counts, data, scale.data
 5 other assays present: integrated, guide_assignments, guide_assignments_ctrl, modules_pos, modules_neg
 12 dimensional reductions calculated: pca, umap, harmony2, humap2, css2, cssumap2, harmony, humap, css, cssumap, seurat, sumap

CodeAndRoll2 Installation Error in latest R, Rstudio, Linux.

hi Vertesy,

The CodeAndRoll2 PKG
sounds great.
But following your instructions exactly,
it does not install ,
( "had non-zero exit status" ).

My PC:

  • UBUNTU LINUX 20.04
  • Rstudio v 2023.06.0 Build 421
  • R 4.3.1

Can you please help?...
Looking forward to using your PKG!.
( install output below my SIG ).

SFd99
San Francisco
============

devtools::install_github(repo = "vertesy/CodeAndRoll2")
Downloading GitHub repo vertesy/CodeAndRoll2@HEAD
Skipping 1 packages not available: Stringendo
── R CMD build ───────────────────────────────────────────
✔ checking for file ‘/tmp/RtmpOtWwOo/remotes30ef43b8d794/vertesy-CodeAndRoll2-9635b15/DESCRIPTION’ ...
─ preparing ‘CodeAndRoll2’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘CodeAndRoll2_2.4.6.tar.gz’

Installing package into ‘/home/ray/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
ERROR: dependency ‘Stringendo’ is not available for package ‘CodeAndRoll2’

  • removing ‘/home/ray/R/x86_64-pc-linux-gnu-library/4.3/CodeAndRoll2’
    Warning message:
    In i.p(...) :
    installation of package ‘/tmp/RtmpOtWwOo/file30ef47d098a/CodeAndRoll2_2.4.6.tar.gz’ had non-zero exit status

CodeAndRoll2 Installation

I tried installing CodeAndRoll2 with

require("devtools")
devtools::install_github(repo = "vertesy/CodeAndRoll2")

but got the following error:
Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
No commit found for the ref master

Did you spell the repo owner (vertesy) and repo name (CodeAndRoll2) correctly?

  • If spelling is correct, check that you have the required permissions to access the repo.

This only worked once I installed it from the main branch and not the master. Might be useful in the future for others:
devtools::install_github(repo = "vertesy/CodeAndRoll2", ref = 'main')

To Do

As of 2021 it is a major task to format this library into a proper package

image

Wiki

Core functionality

  • Data object operations

Move to StringsAndPaths

  • StringsAndPath operations
  • helpers for Markdownreports and ggExpress

Move to FileWriter or IO

  • Input Output
  • write.simple functions

Move to Rocinante

  • Anything not core and StringsAndPaths
  • No

Package environment needs clarity

To Do

  • My package dependency should be a tree, not a network. → See draw.io.
  • Packages should import specific fun, not depend (=and load) an entire package
    • Define what load-dependencies are essential for each package
    • Then rest of fun's get ::.
  • Add ::-s
  • Check dependencies in each package
    • Get a package that fixes dependencies.
    • Maria tools::package_dependencies.

as.named.vector() on a DF column gives back a vector much longer than the original dimensions

Description
as.named.vector() on a DF column gives back a vector much longer than the original dimensions

Expected Behavior

  • complain if not uni dimensional?

Buggy Behavior

> l(as.named.vector(obj@meta.data[ , assignments]))
[1] 35860
> dim((obj@meta.data[ , assignments]))
[1] 7172    5

Fun

 as.named.vector <- function (df_col, WhichDimNames = 1) 
{
    namez = dimnames(df_col)[[WhichDimNames]]
    if (is.list(df_col) & !is.data.frame(df_col)) {
        namez = names(df_col)
    }
    vecc = as.vector(unlist(df_col))
    names(vecc) = namez
    return(vecc)
}
<bytecode: 0x7fd41b108ba8>
<environment: namespace:CodeAndRoll2>

Error in multiFeaturePlot.A4 / split_vec_to_list_by_N

astrocyte_markers <- c("APOE", "GFAP", "S100B", "AQP4")
multiFeaturePlot.A4(astrocyte_markers , obj = reference_obj, nr.Row = 2)

# ...

[1] "layout active, nr.Col ignored."
Error in CodeAndRoll2::split_vec_to_list_by_N(1:length(list.of.genes.found),  : 
  length(vec) > by is not TRUE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.