Skip to content
Snippets Groups Projects
Commit c4273767 authored by Kornel.Labun's avatar Kornel.Labun
Browse files

first commit, design of guides done

parent 6c3fba81
No related branches found
No related tags found
No related merge requests found
Showing with 15882 additions and 83 deletions
.Rproj.user
.Rhistory
.RData
.Ruserdata
# Umberto-hybrid-16S
E. coli 16S conserved region with preferably exposed part (defined by Ribo-seq)
will be targeted with Cas13b. Try not to cut other rRNA like 5S + other mRNA -
but we don't care that much about off-targets.
## Getting started
PbuCas13b PFS in bacteria is not well defined, in human they have not observed it.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5793859/
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5432119/
https://www.sciencedirect.com/science/article/pii/S2211124719302803
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
E. coli essential genes with Cas13b revealed that spacers with secondary
structure near the protospacer had reduced depletion in the screen.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
https://zlab.bio/cas13
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
Based on the suplementary from Slaymaker paper I think spacer is 31bp and no
PFS.
```
cd existing_repo
git remote add origin https://git.app.uib.no/valenlab/umberto-hybrid-16s.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](https://git.app.uib.no/valenlab/umberto-hybrid-16s/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
PbuCas13b used is https://www.addgene.org/115209/
Alternatively, guides can be ordered as synthetic RNA from providers such as
IDT or Synthego, and we have seen increased performance with synthesized RNA.
\ No newline at end of file
>J01859.1 Escherichia coli 16S ribosomal RNA, complete sequence
AAATTGAAGAGTTTGATCATGGCTCAGATTGAACGCTGGCGGCAGGCCTAACACATGCAAGTCGAACGGTAACAGGAAGA
AGCTTGCTCTTTGCTGACGAGTGGCGGACGGGTGAGTAATGTCTGGGAAACTGCCTGATGGAGGGGGATAACTACTGGAA
ACGGTAGCTAATACCGCATAACGTCGCAAGACCAAAGAGGGGGACCTTCGGGCCTCTTGCCATCGGATGTGCCCAGATGG
GATTAGCTAGTAGGTGGGGTAACGGCTCACCTAGGCGACGATCCCTAGCTGGTCTGAGAGGATGACCAGCCACACTGGAA
CTGAGACACGGTCCAGACTCCTACGGGAGGCAGCAGTGGGGAATATTGCACAATGGGCGCAAGCCTGATGCAGCCATGCC
GCGTGTATGAAGAAGGCCTTCGGGTTGTAAAGTACTTTCAGCGGGGAGGAAGGGAGTAAAGTTAATACCTTTGCTCATTG
ACGTTACCCGCAGAAGAAGCACCGGCTAACTCCGTGCCAGCAGCCGCGGTAATACGGAGGGTGCAAGCGTTAATCGGAAT
TACTGGGCGTAAAGCGCACGCAGGCGGTTTGTTAAGTCAGATGTGAAATCCCCGGGCTCAACCTGGGAACTGCATCTGAT
ACTGGCAAGCTTGAGTCTCGTAGAGGGGGGTAGAATTCCAGGTGTAGCGGTGAAATGCGTAGAGATCTGGAGGAATACCG
GTGGCGAAGGCGGCCCCCTGGACGAAGACTGACGCTCAGGTGCGAAAGCGTGGGGAGCAAACAGGATTAGATACCCTGGT
AGTCCACGCCGTAAACGATGTCGACTTGGAGGTTGTGCCCTTGAGGCGTGGCTTCCGGAGCTAACGCGTTAAGTCGACCG
CCTGGGGAGTACGGCCGCAAGGTTAAAACTCAAATGAATTGACGGGGGCCCGCACAAGCGGTGGAGCATGTGGTTTAATT
CGATGCAACGCGAAGAACCTTACCTGGTCTTGACATCCACGGAAGTTTTCAGAGATGAGAATGTGCCTTCGGGAACCGTG
AGACAGGTGCTGCATGGCTGTCGTCAGCTCGTGTTGTGAAATGTTGGGTTAAGTCCCGCAACGAGCGCAACCCTTATCCT
TTGTTGCCAGCGGTCCGGCCGGGAACTCAAAGGAGACTGCCAGTGATAAACTGGAGGAAGGTGGGGATGACGTCAAGTCA
TCATGGCCCTTACGACCAGGGCTACACACGTGCTACAATGGCGCATACAAAGAGAAGCGACCTCGCGAGAGCAAGCGGAC
CTCATAAAGTGCGTCGTAGTCCGGATTGGAGTCTGCAACTCGACTCCATGAAGTCGGAATCGCTAGTAATCGTGGATCAG
AATGCCACGGTGAATACGTTCCCGGGCCTTGTACACACCGCCCGTCACACCATGGGAGTGGGTTGCAAAAGAAGTAGGTA
GCTTAACCTTCGGGAGGGCGCTTACCACTTTGTGATTCATGACTGGGGTGAAGTCGTAACAAGGTAACCGTAGGGGAACC
TGCGGTTGGATCACCTCCTTA
This diff is collapsed.
File added
Region;start;stop;level
F1;1;68;1
V1;69;99;0
C1;100;136;1
V2;137;242;0
C2;243;432;1
V3;433;497;0
C3;498;575;1
V4;576;682;0
C4;683;821;1
V5;822;879;0
C5;880;985;1
V6;986;1043;0
C6;1044;1116;1
V7;1117;1173;0
C7;1174;1242;1
V8;1243;1294;0
C8;1295;1434;1
V9;1435;1465;0
C9;1466;end;1
>EBT00051352363 ncrna supercontig:ASM160652v1:STEC1686_contig_122:117:2969:-1 gene:AML35_02580 gene_biotype:rRNA transcript_biotype:rRNA description:23S ribosomal RNA
GGGTTGTGAGGTTAAGCGACTAAGCGTACACGGTGGATGCCCTGGCAGTCAGAGGCGATG
AAGGACGTGCTAATCTGCGATAAGCGTCGGTAAGGTGATATGAACCGTTATAACCGGCGA
TTTCCGAATGGGGAAACCCAGTGTGATTCGTCACACTATCATTAACTGAATCCATAGGTT
AATGAGGCGAACCGGGGGAACTGAAACATCTAAGTACCCCGAGGAAAAGAAATCAACCGA
GATTCCCCCAGTAGCGGCGAGCGAACGGGGAGCAGCCCAGAGCCTGAATCAGTGTGTGTG
TTAGTGGAAGCGTCTGGAAAGGCGCGCGATACAGGGTGACAGCCCCGTACACAAAAATGC
ACATACTGTGAGCTCGATGAGTAGGGCGGGACACGTGGTATCCTGTCTGAATATGGGGGG
ACCATCCTCCAAGGCTAAATACTCCTGACTGACCGATAGTGAACCAGTACCGTGAGGGAA
AGGCGAAAAGAACCCCGGCGAGGGGAGTGAAAAAGAACCTGAAACCGTGTACGTACAAGC
AGTGGGAGCACAGAGCAATCTGTGTGACTGCGTACCTTTTGTATAATGGGTCAGCGACTT
ATATTCTGTAGCAAGGTTAACCGAATAGGGGAGCCGAAGGGAAACCGAGTCTTAACTGGG
CGTTAAGTTGCAGGGTATAGACCCGAAACCCGGTGATCTAGCCATGGGCAGGTTGAAGGT
TGGGTAACACTAACTGGAGGACCGAACCGACTAATGTTGAAAAATTAGCGGATGACTTGT
GGCTGGGGGTGAAAGGCCAATCAAACCGGGAGATAGCTGGTTCTCCCCGAAAGCTATTTA
GGTAGCGCCTCGTGAATTCATCTCCGGGGGTAGAGCACTGTTTCGGCAAGGGGGTCATCC
CGACTTACCAACCCGATGCAAACTGCGAATACCGGAGAATGTTATCACGGGAGACACACG
GCGGGTGCTAACGTCCGTCGTGAAGAGGGAAACAACCCAGACCGCCAGCTAAGGTCCCAA
AGTCATGGTTAAGTGGGAAACGATGTGGGAAGGCCCAGACAGCCAGGATGTTGGCTTAGA
AGCAGCCATCATTTAAAGAAAGCGTAATAGCTCACTGGTCGAGTCGGCCTGCGCGGAAGA
TGTAACGGGGCTAAACCATGCACCGAAGCTGCGGCAGCGACACTATGTGTTGTTGGGTAG
GGGAGCGTTCTGTAAGCCTGTGAAGGTGTACTGTGAGGTATGCTGGAGGTATCAGAAGTG
CGAATGCTGACATAAGTAACGATAAAGCGGGTGAAAAGCCCGCTCGCCGGAAGACCAAGG
GTTCCTGTCCAACGTTAATCGGGGCAGGGTGAGTCGACCCCTAAGGCGAGGCCGAAAGGC
GTAGTCGATGGGAAACAGGTTAATATTCCTGTACTTGGTGTTACTGCGAAGGGGGGACGG
AGAAGGCTATGTTGGCCGGGCGACGGTTGTCCCGGTTTAAGCGTGTAGGCTGGTTTTCCA
GGCAAATCCGGAAAATCAAGGCTGAGGCGTGATGACGAGGCACTACGGTGCTGAAGCAAC
AAATGCCCTGCTTCCAGGAAAAGCCTCTAAGCATCAGGTAACATCAAATCGTACCCCAAA
CCGACACAGGTGGTCAGGTAGAGAATACCAAGGCGCTTGAGAGAACTCGGGTGAAGGAAC
TAGGCAAAATGGTGCCGTAACTTCGGGAGAAGGCACGCTGATATGTAGGTGAAGTCCCTC
GCGGATGGAGCTGAAATCAGTCGAAGATACCAGCTGGCTGCAACTGTTTATTAAAAACAC
AGCACTGTGCAAACACGAAAGTGGACGTATACGGTGTGACGCCTGCCCGGTGCCGGAAGG
TTAATTGATGGGGTCAGCGCAAGCGAAGCTCTTGATCGAAGCCCCGGTAAACGGCGGCCG
TAACTATAACGGTCCTAAGGTAGCGAAATTCCTTGTCGGGTAAGTTCCGACCTGCACGAA
TGGCGTAATGATGGCCAGGCTGTCTCCACCCGAGACTCAGTGAAATTGAACTCGCTGTGA
AGATGCAGTGTACCCGCGGCAAGACGGAAAGACCCCGTGAACCTTTACTATAGCTTGACA
CTGAACATTGAGCCTTGATGTGTAGGATAGGTGGGAGGCTTNNATCCGGGTTGCGGACAG
TGTCTGGTGGGTAGTTTGACTGGGGCGGTCTCCTCCTAAAGAGTAACGGAGGAGCACGAA
GGTTGGCTAATCCTGGTCGGACATCAGGAGGTTAGTGCAATGGCATAAGCCAGCTTGACT
GCGAGCGTGACGGCGCGAGCAGGTGCGAAAGCAGGTCATAGTGATCCGGTGGTTCTGAAT
GGAAGGGCCATCGCTCAACGGATAAAAGGTACTCCGGGGATAACAGGCTGATACCGCCCA
AGAGTTCATATCGACGGCGGTGTTTGGCACCTCGATGTCGGCTCATCACATCCTGGGGCT
GAAGTAGGTCCCAAGGGTATGGCTGTTCGCCATTTAAAGTGGTACGCGAGCTGGGTTTAG
AACGTCGTGAGACAGTTCGGTCCCTATCTGCCGTGGGCGCTGGAGAACTGAGGGGGGCTG
CTCCTAGTACGAGAGGACCGGAGTGGACGCATCACTGGTGTTCGGGTTGTCATGCCAATG
GCACTGCCCGGTAGCTAAATGCGGAAGAGATAAGTGCTGAAAGCATCTAAGCACGAAACT
TGCCCCGAGATGAGTTCTCCCTGACTCCTTGAGAGTCCTGAAGGAACGTTGAAGACGACG
ACGTTGATAGGCCGGGTGTGTAAGCGCAGCGATGCGTTGAGCTAACCGGTACTAATGAAC
CGTGAGGCTTAACCTTACAACGCCGAAGCTGTT
>EBT00051352366 ncrna supercontig:ASM160652v1:STEC1686_contig_13:70:185:1 gene:EBG00051352365 gene_biotype:rRNA transcript_biotype:rRNA gene_symbol:rrf description:5S ribosomal RNA
CCTGGCGGCCGTAGCGCGGTGGTCCCACCTGACCCCATGCCGAACTCAGAAGTGAAACGC
CGTAGCGCCGATGGTAGTGTGGGGTCTCCCCATGCGAGAGTAGGGAACTGCCAGGC
>EBT00051352390 ncrna supercontig:ASM160652v1:STEC1686_contig_186:5193:5308:-1 gene:EBG00051352389 gene_biotype:rRNA transcript_biotype:rRNA gene_symbol:rrf description:5S ribosomal RNA
CCTGGCGGCCTTAGCGCGGTGGTCCCACCTGACCCCATGCCGAACTCAGAAGTGAAACGC
CGTAGCGCCGATGGTAGTGTGGGGTCTCCCCATGCGAGAGTAGGGAACTGCCAGGC
>EBT00051352415 ncrna supercontig:ASM160652v1:STEC1686_contig_35:70:185:1 gene:EBG00051352414 gene_biotype:rRNA transcript_biotype:rRNA gene_symbol:rrf description:5S ribosomal RNA
CCTGGCGGCCTTAGCGCGGTGGTCCCACCTGACCCCATGCCGAACTCAGAAGTGAAACGC
CGTAGCGCCGATGGTAGTGTGGGGTCTCCCCATGCGAGAGTAGGGAACTGCCAGGC
>EBT00051352412 ncrna supercontig:ASM160652v1:STEC1686_contig_35:315:430:1 gene:EBG00051352411 gene_biotype:rRNA transcript_biotype:rRNA gene_symbol:rrf description:5S ribosomal RNA
TCTGGCGGCAGTAGCGCGGTGGTCCCACCTGACCCCATGCCGAACTCAGAAGTGAAACGC
CGTAGCGCCGATGGTAGTGTGGGGACTCCCCATGCGAGAGTAGGGAACTGCCAGAC
>EBT00051352433 ncrna supercontig:ASM160652v1:STEC1686_contig_39:163732:163847:-1 gene:EBG00051352432 gene_biotype:rRNA transcript_biotype:rRNA gene_symbol:rrf description:5S ribosomal RNA
CCTGGCGGCCTTAGCGCGGTGGTCCCACCTGACCCCATGCCGAACTCAGAAGTGAAACGC
CGTAGCGCCGATGGTAGTGTGGGGTCTCCCCATGCGAGAGTAGGGAACTGCCAGGC
>EBT00051352452 ncrna supercontig:ASM160652v1:STEC1686_contig_51:18:133:1 gene:EBG00051352451 gene_biotype:rRNA transcript_biotype:rRNA gene_symbol:rrf description:5S ribosomal RNA
CCTGGCGGCCGTAGCGCGGTGGTCCCACCTGACCCCATGCCGAACTCAGAAGTGAAACGC
CGTAGCGCCGATGGTAGTGTGGGGTCTCCCCATGCGAGAGTAGGGAACTGCCAGGC
>EBT00051352464 ncrna supercontig:ASM160652v1:STEC1686_contig_77:47428:47543:-1 gene:EBG00051352463 gene_biotype:rRNA transcript_biotype:rRNA gene_symbol:rrf description:5S ribosomal RNA
CCTGGCGGCCGTAGCGCGGTGGTCCCACCTGACCCCATGCCGAACTCAGAAGTGAAACGC
CGTAGCGCCGATGGTAGTGTGGGGTCTCCCCATGCGAGAGTAGGGAACTGCCAGGC
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
figures/16S_overlay.png

245 KiB

guides.csv 0 → 100644
This diff is collapsed.
# E COLI 16S rRNA analysis
# Ribo-seq sample 1: ECOLI wild MG1655 delta-gcvB type 72 Million reads SRR16301570 (2022)
# rRNA removal MEGAclear transcription clean-up kit
# Ribo-seq sample 2: ECOLI wild strain: W3110 50 Million reads SRR16249189 (2021)
# RNA from total monosomes and SecA-bound monosomes was extracted using Direct-zol kit.
library(ORFik)
library(data.table)
# Set up folders
proj_folder <- "/home/roler/Desktop/Bio_data/Umberto_16S_ECOLI/"
config <- config.exper(experiment = "ECOLI_16S", type = "Ribo-Seq", assembly = "Escherichia_coli_ASM584v2")
config2 <- config.exper(experiment = "ECOLI_16S_2", type = "Ribo-Seq", assembly = "Escherichia_coli_ASM584v2")
raw_data_2 <- config2["fastq Ribo-Seq"]
proc_data_2 <- config2["bam Ribo-Seq"]
genome <- file.path(config["ref"], "16S_rRNA.fa")
# Load conserved regions, transform to GRanges
conserved_regions <- fread(file.path(proj_folder, "Conserved_regions.csv"))
ends <- unlist(conserved_regions[,3], use.names = F)
ends[length(ends)] <- 1541
conserved_gr <- GRanges("J01859.1",
IRanges(unlist(conserved_regions[,2], use.names = F),
as.integer(ends)),
strand = "+")
conserved_gr$score <- unlist(conserved_regions[,4], use.names = F)
# Download reads
info <- download.SRA.metadata("PRJNA770675", auto.detect = T)
download.SRA(info[1,], outdir = config["fastq Ribo-Seq"], rename = TRUE, use.ebi.ftp = T)
download.SRA("SRR16249189", outdir = raw_data_2)
# Make STAR index without GTF
arguments <- c(genome = genome)
index <- STAR.index(arguments, SAsparse = 2, max.ram = 20)
## Align
# Sample 1
STAR.align.folder(input.dir = config["fastq Ribo-Seq"], output.dir = config["bam Ribo-Seq"], index.dir = index,
steps = "tr", adapter.sequence = "CTGTAGGCACCATCAAT")
STAR.align.folder(input.dir = config["fastq Ribo-Seq"], output.dir = config["bam Ribo-Seq"], index.dir = index,
steps = "tr-ge", resume = "ge", allow.introns = FALSE)
# Sample 2
STAR.align.folder(input.dir = raw_data_2, output.dir = proc_data_2, index.dir = index,
steps = "tr", adapter.sequence = "CTGTAGGCACCATCAAT")
STAR.align.folder(input.dir = raw_data_2, output.dir = proc_data_2, index.dir = index,
steps = "tr-ge", resume = "ge", allow.introns = FALSE)
# Load all ranges
rRNA <- Biostrings::readDNAStringSet(arguments["genome"])
RFP <- fimport(file.path(config["bam Ribo-Seq"], "aligned/SRR16301570_Aligned.sortedByCoord.out.bam"))
RFP2 <- fimport(file.path(proc_data_2, "aligned/SRR16249189_Aligned.sortedByCoord.out.bam"))
grl <- GRangesList(rRNA_16S = GRanges("J01859.1", IRanges(1, width = width(rRNA)), "+"))
# Make all coverage tiles
tile <- coveragePerTiling(grl, RFP, as.data.table = T, is.sorted = T, fraction = "Ribo-seq")
tile[, feature := "16S rRNA"]
tile2 <- coveragePerTiling(grl, RFP2, as.data.table = T, is.sorted = T, fraction = "Ribo-seq2")
tile2[, feature := "16S rRNA"]
tile_cons <- coveragePerTiling(grl, conserved_gr, as.data.table = T, is.sorted = T, fraction = "conservation")
tile_cons[, feature := "16S rRNA"]
# Plot
windowCoveragePlot(rbindlist(list(tile, tile2, tile_cons)), scoring = "sum", title = "16S rRNA conservation")
windowCoveragePlot(rbindlist(list(tile, tile2, tile_cons)), scoring = "log2sum", title = "16S rRNA conservation")
# Save coverage files
fwrite(tile, file.path(proj_folder,"RFP_coverage_rep1.csv"))
fwrite(tile2, file.path(proj_folder,"RFP_coverage_rep2.csv"))
fwrite(tile_cons, file.path(proj_folder,"16S_conservation_coverage.csv"))
saveRDS(rRNA, file.path(proj_folder,"16S_rRNA_fasta.rds"))
# Load Guides
# Find overlaps to conserved regions
rm(list = ls(all.names = TRUE))
gc(reset = TRUE)
#devtools::install_github("m-swirski/RiboCrypt", dependencies = T)
library(RiboCrypt)
library(ORFik)
library(data.table)
library(rxtras)
library(Biostrings)
# a <- readRDS("data/16S_rRNA_fasta.rds")
# writeXStringSet(a, "data/16S.fa")
struct <- fread("data/J01859.1.mt")
struct$V3 <- NULL
struct$V4 <- NULL
colnames(struct) <- c("position", "count") # (mean) number of base pairs enclosing base i - high means closed - low means open
struct$fraction <- "Structure"
struct$feature <- "16S rRNA"
struct$genes <- 1
struct <- struct[, c("count", "genes", "position", "fraction", "feature")]
tile_RFP1 <- fread("data/RFP_coverage_rep1.csv")
tile_RFP2 <- fread("data/RFP_coverage_rep2.csv")
tile_cons <- fread("data/16S_conservation_coverage.csv")
p <- windowCoveragePlot(rbindlist(list(tile_RFP1, tile_RFP2, tile_cons, struct)),
scoring = "sum", title = "16S rRNA conservation")
ggsave("figures/16S_overlay.png", p)
# 1 is conserved, 0 means variable (so we want guides in conserved region (count = 1))
# and we would prefer sites which are exposed means no Ribo-seq there
ot <- readDNAStringSet("data/Ecoli_rRNA.fa")
seq <- readDNAStringSet("data/16S.fa")[[1]]
guides <- c()
for (i in 69:1465) { # excluding first and last conserved regions
guides <- c(guides, seq[i:(i+29)])
}
guides <- DNAStringSet(guides)
dt <- data.table(sequence = as.character(guides),
position = 69:1465,
conservation = NA,
ribo_coverage = NA,
structure = NA,
offtargets_d0 = NA,
offtargets_d1 = NA)
vm <- function(seq) {
res <- vmatchPattern(seq, ot, max.mismatch = 0, min.mismatch = 0, with.indels = F, fixed = T)
sum(elementNROWS(res))
}
for (i in 1:dim(dt)[1]) {
dt$conservation[i] <- mean(tile_cons[position %in% dt$position[i]:(dt$position[i] + 29)]$count)
dt$structure[i] <- mean(struct[position %in% dt$position[i]:(dt$position[i] + 29)]$count)
dt$ribo_coverage[i] <- sum(c(tile_RFP1[position %in% dt$position[i]:(dt$position[i] + 29)]$count,
tile_RFP2[position %in% dt$position[i]:(dt$position[i] + 29)]$count))
# offtargets
dt$offtargets_d0[i] <- vm(dt$sequence[i])
dt$offtargets_d1[i] <- sum(sapply(amplican:::comb_along(dt$sequence[i], m = 1), vm))
}
dt <- dt[order(-conservation, ribo_coverage, offtargets_d0, offtargets_d1, structure, decreasing = F, na.last = T)]
fwrite(dt, "guides.csv")
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment