GithubHelp home page GithubHelp logo

alexarnimueller / modlamp Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 17.0 40.85 MB

Python package for peptide sequence generation, peptide descriptor calculation and sequence analysis.

Home Page: https://modlamp.org

License: Other

Makefile 0.05% Python 99.95%

modlamp's Introduction

modlamp's People

Contributors

alexarnimueller avatar ethmodlab avatar ggabernet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

modlamp's Issues

plot.py plot_aa_distr bug

Hi,

There is a bug within plot.py, function plot_aa_distr. It should be as it used to be:

for a in range(20):
  plt.bar(a, list(aa.values())[a], 0.9, color=color)

Rather than (680-682):

for i, v in enumerate([k for k, w in aa.items()]):
  plt.bar(i, v, 0.9, color=color)

Vito

tests

score_cv and test_amphiarc failing

Improve documentation for descriptors.GlobalDescriptor

https://modlamp.org/modlamp.html#modlamp.descriptors.GlobalDescriptor.calculate_all

The method descriptors.GlobalDescriptor returns an array of 10 elements (everything except molecular formula). However, the documented example shows an array of 9 elements; sequence charge is missing. This was quite baffling to me when I first used the method.

The documentation could be written as such for better clarity:
"Method combining all 10 global descriptors (except molecular formula)..."

Difficulty in Analysis of Different Sequence Libraries

Dear Sir
I am using modlamp.analysis module for analysing the peptide sequence dataset. I am able to run the g = GlobalAnalysis(['GLFDIVKKVVGALG', 'KLLKLLKKLLKLLK', ...], names=['Library1']) for amino acid frequency calculation and summary plot but facing difficulty in inputting the dataset as dataframe.

I converted csv file into dataframe but was not able to do analysis using above commands. i am getting the syntax error. Can you please guide me how to use dataframe in above script.
furthermore, I want to ask whether Analysis of Different Sequence Libraries only takes input in form of list/array only. If yes, how can i use my peptide dataframe dataset to do analysis.
I have 3 libraries of peptide in form of column.

Please help
Regards
Sandeep

GlobalAnalysis Plot

  1. In the plot_summary of the GlobalAnalysis plot, the legend grows over the amide and pH info if more than 3 libraries are plotted.
  2. if only one library is plotted, the bars in the AA distribution plot are shifted too much towards the right

py3?

Very nice project! Unfortunately, the rest of my code base if very much py3 based - have you considered adding py3 support? Would you be interested in contributions?

pips internal functions issue while building biocoda package

I have successfully added modlamp==4.1.2 to bioconda, however, while I am trying to build a package for 4.1.4 the latest release it's showing an error given below while building the conda package. The similar error I also experience while I am trying to install modlamp==4.1.4 using pip to my local computer and install failed eventually.

13:22:46 BIOCONDA INFO (OUT) Added file://$SRC_DIR to build tracker '/tmp/pip-req-tracker-u0iC5E'
13:22:46 BIOCONDA INFO (OUT) Running setup.py (path:$SRC_DIR/setup.py) egg_info for package from file://$SRC_DIR
13:22:46 BIOCONDA INFO (OUT) Running command python setup.py egg_info
13:22:46 BIOCONDA INFO (OUT) Created temporary directory: /tmp/pip-pip-egg-info-hJByB2
13:22:46 BIOCONDA INFO (OUT) Traceback (most recent call last):
13:22:46 BIOCONDA INFO (OUT) File "", line 1, in
13:22:46 BIOCONDA INFO (OUT) File "/opt/conda/conda-bld/modlamp_1588166316542/work/setup.py", line 11, in
13:22:46 BIOCONDA INFO (OUT) reqs = [str(ir.req) for ir in install_reqs][:-1]
13:22:46 BIOCONDA INFO (OUT) AttributeError: 'ParsedRequirement' object has no attribute 'req'

details can be found on this "bioconda/bioconda-recipes#21839"

After discussing this issue with Bioconda community, it looks like some pip's internal functions have been used that will break over time. resolve this issue will help to build this package for conda.

Issue in obtaining descriptors for FASTA data

Hello @alexarnimueller

I am having an issue in obtaining the descriptor data for the FASTA data here- http://caps.ncbs.res.in/3dswap-pred/data/3dswap-pred_positive_dataset.fasta

Here is the program I am running-

from modlamp.descriptors import PeptideDescriptor
pepdesc = PeptideDescriptor('3dswap-pred_negative_dataset.fasta', 'eisenberg') 
pepdesc.calculate_global()
pepdesc.calculate_moment(append=True)  
pepdesc.load_scale('z3')
pepdesc.calculate_autocorr(1, append=True)
col_names = 'ID,Sequence,H_Eisenberg,uH_Eisenberg,Z3_1,Z3_2,Z3_3'
pepdesc.save_descriptor('neg_descriptors1.csv', header=col_names)

I am obtaining this error-

Traceback (most recent call last):
  File "desc_negative.py", line 8, in <module>
    pepdesc.calculate_global()  # calculate global Eisenberg hydrophobicity
  File "/usr/local/lib/python2.7/dist-packages/modlamp/descriptors.py", line 802, in calculate_global
    mtrx.append(self.scale[str(seq[l])])
KeyError: 'X'

Running SVM on AMP vs UniProt shows an error.

@alexarnimueller I am getting an error on running the AMP classification using SVM.

Traceback (most recent call last):
  File "classify-amp.py", line 27, in <module>
    lib.generate_sequences()
  File "/home/ssouravsingh12/.local/lib/python2.7/site-packages/modlamp/sequences.py", line 536, in generate_sequences
    H.generate_sequences()
  File "/home/ssouravsingh12/.local/lib/python2.7/site-packages/modlamp/sequences.py", line 136, in generate_sequences
    seq = ['X'] * random.choice(range(self.lenmin, self.lenmax + 1))
  File "mtrand.pyx", line 1121, in mtrand.RandomState.choice (numpy/random/mtrand/mtrand.c:17200)
ValueError: a must be non-empty

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.