Giter Club home page Giter Club logo

Comments (1)

sjgosai avatar sjgosai commented on July 16, 2024

Hey Adam,

If you give me a bit more info I can give you some more detailed advice, but I can try to get you started. First off, pre-split your data into three separate TSVs so you have train/validation/test batches. Building off of the notebook construct_new_model.ipynb, you can replace boda.data.MPRA_DataModule with boda.data.SeqDataModule (link).

In cell [3], replace the data_module:

data_module = boda.data.SeqDataModule
...

And in cell [4], initialize the data_module with your data files:

data = data_module(
    train_file = "/home/ubuntu/dummy_train.tsv",
    test_file = "/home/ubuntu/dummy_test.tsv",
    val_file = "/home/ubuntu/dummy_val.tsv",
    seq_len = 600, # Replace this based on input_len used for modeling
    left_flank = boda.common.constants.MPRA_UPSTREAM[-200:], # Replace with a string of nt from your vector
    right_flank = boda.common.constants.MPRA_DOWNSTREAM[:200], # Replace with a string of nt from your vector
    use_revcomp = True,
    skip_header=True # Use if your TSVs have a header
)

I'm attaching the dummy_*.tsv files in a zip for you to use as an example dummy_files.zip. Note is that everything in the notebook is set up to model 200nt sequences that were tested with MPRA using the reporter vector referenced in our preprint. If this isn't true for your use case, you will need to modify a few things. What immediately comes to mind is that you will want to use the BassetVL model_module (link) and will need to set the options input_len and n_outputs to suitable values for your data (i.e., modify cells [3] and [5] accordingly). You will also need to alter the seq_len option in cell [4] to match input_len option in cell [5]. Keep in mind is that the Basset architecture, generally, has a requirement that input_len = (n * 48) - 24, where n is an integer. This means you will likely need to provide the data_module with nucleotide sequences to serve as left and right flanks using the left_flank and right_flank options in cell [4].

Hope this gets you started.

from boda2.

Related Issues (8)

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.