Title: | Lineage tracing by indels |
---|---|
Description: | When we combine gene-editing technology and sequencing technology, we need to reconstruct a lineage tree from alleles generated and calculate the similarity between each pair of groups. FindIndel() and IndelForm() function will help you align each read to reference sequence and generate scar form strings respectively. IndelIdents() function will help you to define a scar form for each cell or read. IndelPlot() function will help you to visualize the distribution of deletion and insertion. TagProcess() function will help you to extract indels for each cell or read. TagDist() function will help you to calculate the similarity between each pair of groups across the indwells they contain. BuildTree() function will help you to reconstruct a tree. PlotTree() function will help you to visualize the tree. |
Authors: | Luyue Wang [aut, cre], Bin Xiang [ctb], Hengxin Liu [ctb], Wu Wei [ths] |
Maintainer: | Luyue Wang <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.11.0 |
Built: | 2024-10-30 07:37:09 UTC |
Source: | https://github.com/bioc/LinTInd |
Title
align_to_range(p, s, cut)
align_to_range(p, s, cut)
p |
A base sequence in character format |
s |
A base sequence in character format |
cut |
The distance between the starting sites of two fragments |
A list include two IRanges instances (deletion and insertion)
align_to_range(p="AAGG---AAATTTCGGAATAAGGAATTT",s="AAGGCCCCAAATTT-CGGAATAAGGAATTT",cut=0)
align_to_range(p="AAGG---AAATTTCGGAATAAGGAATTT",s="AAGGCCCCAAATTT-CGGAATAAGGAATTT",cut=0)
Generate an array generant tree of a data.tree data structure and save it
BuildTree(tag)
BuildTree(tag)
tag |
List generate from TagProcess, for more see |
Title
list with two elements, a data.tree data structure and a dataframe of array information for each cell barcode
data("example_data",package = "LinTInd") treeinfo<-BuildTree(tag)
data("example_data",package = "LinTInd") treeinfo<-BuildTree(tag)
This an example of cellsinfo
data("example_data")
data("example_data")
cellsinfo
This an example of celltype
data("example_data")
data("example_data")
celltype
Title
change_form_stat(indel)
change_form_stat(indel)
indel |
List include two IRanges instances, contain start and end site of deletions and inserstions |
A scar form string
data("example_data",package = "LinTInd") change_form_stat(cellsinfo$indel[[1]])
data("example_data",package = "LinTInd") change_form_stat(cellsinfo$indel[[1]])
This an example of cutsite
data("example_data")
data("example_data")
cutsite
This an example of data
data("example_data")
data("example_data")
data
A set of example data
data("example_data")
data("example_data")
The format is: chr "example_data"
data("example_data",package = "LinTInd")
data("example_data",package = "LinTInd")
This function can ident indels for each reads in input data, and create IRanges instances for deletion and insertion
FindIndel( data, scarfull, scar, align_score = NULL, type = NULL, indel.coverage = NULL, cln )
FindIndel( data, scarfull, scar, align_score = NULL, type = NULL, indel.coverage = NULL, cln )
data |
data frame, include cell barcode, UMI and reads. |
scarfull |
DNAString of reference sequence |
scar |
The cutsite data frame |
align_score |
The minimum alignment score that matched sequence should get, default in this parameter is the score that the reads which all of the target set were cutted got |
type |
Group name for this data ("None" in default) |
indel.coverage |
Choose indels selected scope: "Accurate" (default) means only the indles happenned in target site will be idented; "All" means each indel will be detected even they locate on the anchors |
cln |
The number of threads |
Title
list include IRanges instances (deletion and insertion), a data frame of reads' informations, reference sequenc, dataframe of cut sites
data("example_data",package = "LinTInd") scarinfo<-FindIndel(data=data,scarfull=ref,scar=cutsite,indel.coverage="All",type="test",cln=1)
data("example_data",package = "LinTInd") scarinfo<-FindIndel(data=data,scarfull=ref,scar=cutsite,indel.coverage="All",type="test",cln=1)
Generate scar form strings from scarinfo list for each reads
IndelForm(scarinfo, cln)
IndelForm(scarinfo, cln)
scarinfo |
List generate from FindIndel, for more see |
cln |
The number of threads |
Title
A new list of scarinfo, the scarform of each reads will add in the data frame of reads' informations
data("example_data",package = "LinTInd") IndelForm(scarinfo,cln=1)
data("example_data",package = "LinTInd") IndelForm(scarinfo,cln=1)
Function to define a scarform for each cell(single cell) or each reads(bulk seq, generate 'cell barcode' for each reads)
IndelIdents(scarinfo, method.use = NULL, cln)
IndelIdents(scarinfo, method.use = NULL, cln)
scarinfo |
List generate from IndelForm, for more see |
method.use |
Select how to determine a scar form string for each cell: "reads.num" (default):find the scar with the most reads in the cell; "umi.num":find the scar with the most UMIs in the cell; "consensus":find the consistent sequences in each cell, and then generate scar form strings from the new reads |
cln |
The number of threads |
Title
The list generate from FindIndel, but in 'Scar' element a new column contain scar form strings
data("example_data",package = "LinTInd") IndelIdents(scarinfo,method.use="umi.num",cln=1)
data("example_data",package = "LinTInd") IndelIdents(scarinfo,method.use="umi.num",cln=1)
Return 2 line charts, show the probability of insertion and deletion at each site
IndelPlot(cellsinfo)
IndelPlot(cellsinfo)
cellsinfo |
List generate from IndelIdents, for more see |
Title
2 line charts
data("example_data",package = "LinTInd") IndelPlot(cellsinfo = cellsinfo)
data("example_data",package = "LinTInd") IndelPlot(cellsinfo = cellsinfo)
Function to visualise the array generate tree
PlotTree(treeinfo, data.extract = NULL, annotation = NULL, prefix = NULL)
PlotTree(treeinfo, data.extract = NULL, annotation = NULL, prefix = NULL)
treeinfo |
List generate from BuildTree, for more see |
data.extract |
(optional) If "FALSE" (default), will not return the indel's information, if it's "TRUE", the opposite |
annotation |
(optional) If "TRUE" (default), the annotation of each cell barcodes have to be provided before, and a heatmap of cells' distribution for each array will be return |
prefix |
(optional) Indels' prefix |
Title
A list include a ggplot object, a dataframe show the distribution of each array contained in each group of cells (optional), and a dataframe to create the ggplot object
data("example_data",package = "LinTInd") plotinfo<-PlotTree(treeinfo = treeinfo,data.extract = "TRUE",annotation = "TRUE") plotinfo<-PlotTree(treeinfo = treeinfo,data.extract = "TRUE",annotation = "FALSE")
data("example_data",package = "LinTInd") plotinfo<-PlotTree(treeinfo = treeinfo,data.extract = "TRUE",annotation = "TRUE") plotinfo<-PlotTree(treeinfo = treeinfo,data.extract = "TRUE",annotation = "FALSE")
Function to create a reference dataframe include each position and its' group
ReadCutsite(segref,reftype=NULL)
ReadCutsite(segref,reftype=NULL)
segref |
The cutsite file |
reftype |
Choose the reference type you want, if reftype="Accurate" (default), there will only the target sites be generated; if reftype="All", each site will be generated |
Title
reference dataframe
data("example_data",package = "LinTInd") ReadCutsite(cutsite) ReadCutsite(cutsite,reftype="All")
data("example_data",package = "LinTInd") ReadCutsite(cutsite) ReadCutsite(cutsite,reftype="All")
Function to read fasta file to DNAString object
ReadFasta(filename)
ReadFasta(filename)
filename |
The input fasta file name |
Title
A DNAString object
fafile=paste0(system.file("extdata",package = 'LinTInd'),"/V3.fasta") ReadFasta(fafile)
fafile=paste0(system.file("extdata",package = 'LinTInd'),"/V3.fasta") ReadFasta(fafile)
This an example of ref
data("example_data")
data("example_data")
ref
This an example of scarform
data("example_data")
data("example_data")
scarform
This an example of scarinfo
data("example_data")
data("example_data")
scarinfo
This an example of scarref
data("example_data")
data("example_data")
scarref
This an example of scarref_all
data("example_data")
data("example_data")
scarref_all
This an example of tag
data("example_data")
data("example_data")
tag
If the cell barcode and the anntation of each cell are provided, this function can calculate the relationship between each cell type in three way
TagDist(tag, method = NULL)
TagDist(tag, method = NULL)
tag |
List generate from TagProcess, for more see |
method |
Denote which method to use:
|
Title
2 figures are saved to show the distribution of INDEL and the relationship between groups respectively, the matrix of the relationship between groups is returned
tag_dist=TagDist(tag,method = "spearman") tag_dist=TagDist(tag) tag_dist=TagDist(tag,method = "Jaccard") tag_dist=TagDist(tag,method = "P") tag_dist=TagDist(tag,method = "spearman")
tag_dist=TagDist(tag,method = "spearman") tag_dist=TagDist(tag) tag_dist=TagDist(tag,method = "Jaccard") tag_dist=TagDist(tag,method = "P") tag_dist=TagDist(tag,method = "spearman")
Split each indel from scar form strings and map indel information to cell barcodes
TagProcess(data, Cells = NULL, prefix = NULL)
TagProcess(data, Cells = NULL, prefix = NULL)
data |
List generate from IndelIdents, for more see |
Cells |
(optional) Dataframe of cells' annotation, with two columns: "Cell.BC" and "Cell.type" |
prefix |
(optional) Indels' prefix |
Title
List with two dataframes: Indels for each cell barcode and cells' annotation
data("example_data",package = "LinTInd") TagProcess(cellsinfo$info,Cells=celltype)
data("example_data",package = "LinTInd") TagProcess(cellsinfo$info,Cells=celltype)
This an example of treeinfo
data("example_data")
data("example_data")
treeinfo