Coder Social home page Coder Social logo

snikumbh / archr Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 18.16 MB

archR: Identifying promoter sequence architectures de novo using NMF

Home Page: https://snikumbh.github.io/archR

License: GNU General Public License v3.0

R 99.77% Python 0.23%
r nmf non-negative-matrix-factorization unsupervised-machine-learning r-package promoter-sequence-architectures archr discovery scikit-learn sequence-architectures

archr's Introduction

archR

Lifecycle: experimental DOI Build status Codecov test coverage R build status

Note: This package is currently under development. So, please bear with me while I put the final blocks together. Thanks for your understanding!

archR is an unsupervised, non-negative matrix factorization (NMF)-based algorithm for discovery of sequence architectures de novo. Below is a schematic of archR's algorithm.

Installation

Python scikit-learn dependency

This package requires the Python module scikit-learn. Please see installation instructions here.

To install this package, use

if (!requireNamespace("remotes", quietly = TRUE)) {
    install.packages("remotes")   
}

remotes::install_github("snikumbh/archR", build_vignettes = FALSE)

Usage

# load package
library(archR)
library(Biostrings)


# Creation of one-hot encoded data matrix from FASTA file
# You can use your own FASTA file instead
inputFastaFilename <- system.file("extdata", "example_data.fa", 
                                  package = "archR", 
                                  mustWork = TRUE)

# Specifying dinuc generates dinucleotide features
inputSeqsMat <- archR::prepare_data_from_FASTA(inputFastaFilename,
                                                  sinuc_or_dinuc = "dinuc")

inputSeqsRaw <- archR::prepare_data_from_FASTA(inputFastaFilename, 
                                               raw_seq = TRUE)

nSeqs <- length(inputSeqsRaw)
positions <- seq(1, Biostrings::width(inputSeqsRaw[1]))

# Set archR configuration
# Most arguments have default values
archRconfig <- archR::archR_set_config(
        parallelize = TRUE,
        n_cores = 2,
        n_runs = 100,
        k_min = 1,
        k_max = 20,
        mod_sel_type = "stability",
        bound = 10^-6,
        chunk_size = 100,
	result_aggl = "ward.D",
	result_dist = "euclid",
        flags = list(debug = FALSE, time = TRUE, verbose = TRUE,
                     plot = FALSE)
        )

#
### Call/Run archR
archRresult <- archR::archR(config = archRconfig,
                               seqs_ohe_mat = inputSeqsMat,
                               seqs_raw = inputSeqsRaw,
                               seqs_pos = positions,
                               total_itr = 2,
			       set_ocollation = c(TRUE, FALSE))

Contact

Comments, suggestions, enquiries/requests are welcome! Feel free to email [email protected] or create an new issue

archr's People

Contributors

snikumbh avatar

Watchers

 avatar  avatar

archr's Issues

Wrong message on get_one_hot_encoded_seqs

On line 191 (below) of prepare_data_from_FASTA.R when option is set to sinuc, it shows the message "Generating dinucleotide profiles". I believe this should be mononucleotide instead of dinucleotide?

if (sinuc_or_dinuc == "sinuc") {
    .msg_pstr("Generating dinucleotide profiles", flg=TRUE)
    encoded_seqs <- lapply(seqs_split_as_list,
                            .one_hot_encode_sinuc)

Chromosomal Coordinates

Hi ,

I stumbled upon your package and it seems quite useful. I have quite a few files containing chromosomal coordinates and would like to check the regulatory elements within those chromosomal coordinates, Will it be possible to utilize the package for the analysis?

Best
Ankush

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.