Code Monkey home page Code Monkey logo

peptide-map's People

Contributors

josephsbrown1 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

peptide-map's Issues

How to deal with sequences of unequal length?

This is awesome work.
I am trying to encode some peptides and generate the plots using
Make_Map_Encode_Peptide_and_Dim_Reduce.ipynb
When I tried with my sequences I found that there shouldn't be any duplicate sequences in the input. So, adding

df.drop_duplicates(subset=['Peptide'])

is probably a good idea.
Now, everything works if I trim the sequences to the same length before processing, but if the length of the sequences is different, I get

File ~/anaconda3/envs/EsmFold-jupyter/lib/python3.9/site-packages/pandas/core/internals/blocks.py:1428, in Block.setitem(self, indexer, value, using_cow)
   1425     if isinstance(casted, np.ndarray) and casted.ndim == 1 and len(casted) == 1:
   1426         # NumPy 1.25 deprecation: https://github.com/numpy/numpy/pull/10615
   1427         casted = casted[0, ...]
-> 1428     values[indexer] = casted
   1429 return self

ValueError: could not broadcast input array from shape (32,) into shape (34,)

Have you seen this error?
I would be really grateful for any suggestions.
Amin.

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.