Code Monkey home page Code Monkey logo

Comments (5)

mdaeron avatar mdaeron commented on July 20, 2024 1

Could you test whether ed04198 works for you? It uses a 6-digit hash followed by a sanitized version of the original sample name. I expect it to work well with any arbitrary sample name.

from d47crunch.

mdaeron avatar mdaeron commented on July 20, 2024
KeyError: "'D47_AU002_(2)' is not a valid Parameters name"

That is an error from lmfit, because lmfit model parameter names cannot use a number of special characters (because it clashes with the expression of mathematical constraints such as param_a = 1/(param_b+1)). From here:

the name must match [a-z_][a-z0-9_]* and cannot be a Python reserved word.

D47crunch uses the (crude) function pf() to solve common sample name problems.

  • option 1: edit pf() to handle parentheses. Hacky but easy.
  • option 2: instead of parameter names, use a well-chosen hash of the sample name. Safe (no collisions), but now when an error is raised it will be annoying to look up which sample is the problem.

Any preference between these two options?

from d47crunch.

japhir avatar japhir commented on July 20, 2024

Thanks for the quick reply! Ah, I guess an informative error would suffice here, really. I think it makes total sense not to allow parentheses or other weird characters in the UIDs. I'll just get that stuff out in R and then try again.

from d47crunch.

japhir avatar japhir commented on July 20, 2024

Hmm after trying to resolve this, I guess forcing the sample id's to not start with a number might be limiting. I got this to work by replacing all (, ), [, ], and + with _, but there are also many samples that have ^[a-z0-9_]*.
Furthermore, it seems like all ETH-1, ETH-2's etc. with their - are also a problem.
EDIT: hmm that cannot be the problem, as it's now explicitly asking for an ETH-1, ETH-2, and ETH-3.

from d47crunch.

japhir avatar japhir commented on July 20, 2024

This seems to work! The standardize step is pretty slow (several minutes for a 552 samples and 1959 anchors) but I have no idea how fast it should be, and computing session ETFs with fancy maths is also very slow in my R version.
It didn't throw an immediate error about the wrong Sample names this time and seems to have worked out okay!

from d47crunch.

Related Issues (15)

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.