Giter Club home page Giter Club logo

deep-learning-genomics-primer's Introduction

deep-learning-genomics-primer's People

Contributors

smlatorreo 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep-learning-genomics-primer's Issues

Generation of Artificial DNA sequences

Could you explain how the DNA sequences were created. So far I know, that the ones labeled as binding (1) have the motif CGACCGAACTCC and the ones labeled as not binding (0) don't have the motif. But how was the rest of the sequences generated?

Last Code Block Doesn't Work

Hello,

Thank you for sharing the primer.

Everything works except the last code block.

sequence_index = 1999  # You can change this to compute the gradient for a different example. But if so, change the coloring below as well.
sal = compute_salient_bases(model, input_features[sequence_index])

plt.figure(figsize=[16,5])
barlist = plt.bar(np.arange(len(sal)), sal)
[barlist[i].set_color('C1') for i in range(5,17)]  # Change the coloring here if you change the sequence index.
plt.xlabel('Bases')
plt.ylabel('Magnitude of saliency values')
plt.xticks(np.arange(len(sal)), list(sequences[sequence_index]));
plt.title('Saliency map for bases in one of the positive sequences'
          ' (green indicates the actual bases in motif)');

Running this on Google Colab returns the error below:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-10-b6400cc2276d>](https://localhost:8080/#) in <cell line: 2>()
      1 sequence_index = 1999  # You can change this to compute the gradient for a different example. But if so, change the coloring below as well.
----> 2 sal = compute_salient_bases(model, input_features[sequence_index])
      3 
      4 plt.figure(figsize=[16,5])
      5 barlist = plt.bar(np.arange(len(sal)), sal)

[<ipython-input-9-9666bf2dbd7f>](https://localhost:8080/#) in compute_salient_bases(model, x)
      3 def compute_salient_bases(model, x):
      4   input_tensors = [model.input]
----> 5   gradients = model.optimizer.get_gradients(model.output[0][1], model.input)
      6   compute_gradients = K.function(inputs = input_tensors, outputs = gradients)
      7 

AttributeError: 'Adam' object has no attribute 'get_gradients'

Using categories instead of n_values

The OneHotEncoder object can be created using n_value or categories as parameters. But the use of n_values was deprecated and will be removed in version 0.22. Using n_value is more intuitive for this example, but in the future will be necessary modify n_value to categories.

I make a copy of this notebook and change n-value to categories='auto'. The notebook run without any error.

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.