Giter Site home page Giter Site logo

sinontbar's Introduction

SinONTbar

A R package designed for singleron and ONT data barcode assignment

Requirements

B2B (https://github.com/tangchao7498/CBUC)
Biostrings
IRanges
rDNAse
data.table
ShortRead
DECIPHER

Installation

Your can install B2B from GitHub by:

library(devtools)
devtools::install_github("zhangdannn/SinONTabr")

Run example

library(SinONTbar)
library(B2B)
library(data.table)
library(ShortRead)
library(Biostrings)
library(DECIPHER)

table = SinONTbar::BarcodeAssign(ONTfastq = system.file("data", "nanopore_small.fq", package = "SinONTbar"),
              Sinbarcode = system.file("data", "Singleron.barcodes.tsv.gz", package = "SinONTbar"),
              MaxMisMatchvalue = 10)

image

Run example2

  BsTab = PattafourSeq(ONTfastq = system.file("data", "nanopore_small.fq", package = "SinONTbar"))
  Sinbarcode = system.file("data", "Singleron.barcodes.tsv.gz", package = "SinONTbar")
  BCs <-DNAStringSet(BsTab$Seq)
  names(BCs) <- BsTab$Read
  BCs <- BCs[width(BCs) >= 65]
  NGS <- fread(Sinbarcode, header = FALSE)
  ONTSB <- subseq(BCs, 1, 57)
  NGSSB <- DNAStringSet(unique(NGS$V1))
  MaxMisMatchvalue = 10
  ONT2NGS <- mclapply(seq_along(ONTSB), function(i) B2B:::MatchSB2(ONT = ONTSB[[i]], SB = NGSSB, MaxMisMatch = MaxMisMatchvalue), mc.cores = 1)
  ONT2NGS <- as.data.frame(data.table(Read = names(ONTSB), SB = mapply(as.character, ONT2NGS)))
  ONT2NGS <- ONT2NGS[!is.na(ONT2NGS$SB), ]
  R2B0 <- merge(BsTab, ONT2NGS, by = "Read")

sinontbar's People

Contributors

zhangdannn avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

sjw-danny

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.