fallerlab / ribo-oddr Goto Github PK
View Code? Open in Web Editor NEWRibo-seq focused Oligo Design pipeline for experiment-specific Depletion of Ribosomal RNAs
License: GNU General Public License v3.0
Ribo-seq focused Oligo Design pipeline for experiment-specific Depletion of Ribosomal RNAs
License: GNU General Public License v3.0
I am trying to design rRNA depletion probes and I tried to use the example data with mouse_rRNA.fa as -r input and then placed the output in the current directory
it gives this error
Traceback (most recent call last):
File "src/Ribo-ODDR.py", line 495, in
main()
File "src/Ribo-ODDR.py", line 317, in main
if len(args.samples)<1:
TypeError: object of type 'NoneType' has no len()
Can you please explain whats going on ?
If there are less than 10 samples, they are correctly ordered S1_X...
, S2_X...
, S3_X...
...
But if there are e.g. 21 samples, they are ordered as S1_X...
, S10_X...
, S11_X...
, ...,S19_X...
, S2_X...
, S20_X...
, S21_X...
, S3_X...
, S4_X...
, ..., S9_X...
, so the original order is lost.
Probably the easiest repair is to add enough leading zeros to all numbers have the same length.
E.g. to replace
tmp[[paste("S", as.character(i), "_", sample, "_reads_info", sep="")]] <- reads[,sample]
tmp[[paste("S", as.character(i), "_", sample, "_rrna_per_info", sep="")]] <- rperc[,sample]
with
tmp[[paste("S", sprintf(paste0("%0",nchar(as.character(length(samples))),"d"),i), "_", sample, "_reads_info", sep="")]] <- reads[,sample]
tmp[[paste("S", sprintf(paste0("%0",nchar(as.character(length(samples))),"d"),i), "_", sample, "_rrna_per_info", sep="")]] <- rperc[,sample]
I.e. replace as.character(i)
with sprintf(paste0("%0",nchar(as.character(length(samples))),"d"),i)
.
Hi, I got an error message when using src/Ribo-ODDR.py -h, which seems to be raised because I am now using biopython==1.78, which removed Bio.Alphabet, and I guess it might work if I rolled back to early versions. Do you have any suggestions?
Traceback (most recent call last):
File "src/Ribo-ODDR.py", line 37, in
from Bio.Alphabet import generic_dna, generic_rna
File "/home/ywei/.local/lib/python3.8/site-packages/Bio/Alphabet/init.py", line 20, in
raise ImportError(
ImportError: Bio.Alphabet has been removed from Biopython.
Regards,
Iris
Hello,
I have encountered an issue while trying to design oligos for my experiment. The script threw an IndexError, as shown in the output below.
The fasta file is the same I used for aligning, the bam file also works fine for other applications but I'm not ruling out my files being the cause.
I'd be deeply grateful for any help, thanks!
Command:
src/Ribo-ODDR.py -r my-data/Saccharomyces_cerevisiae.R64-1-1.ncrna.fa -o ./ -ap ./my-data/ -as .bam -s ncrna_mapped_sorted --RIsearch2_exe /home/janm/.conda/pkgs/risearch-2.1-h9bf148f_0/bin/RIsearch2
Output and error message (some parts omitted for brevity):
#### Ribo-ODDR: Ribo-seq Oligo Design for Depleting rRNAs ####
#### PIPELINE STARTED ####
#### These are the given args ####
# rRNA_seqs my-data/Saccharomyces_cerevisiae.R64-1-1.ncrna.fa
# output output
# RIsearch2_exe /home/janm/.conda/pkgs/risearch-2.1-h9bf148f_0/bin/RIsearch2
# bowtie2_build_exe None
# tophat_exe None
# samtools_exe None
# RNAfold_exe None
# OFFtargets None
# OFFtargetsSUF None
# samples ['ncrna_mapped_sorted']
# fastq_prefix None
# fastq_suffix None
# alignment_prefix ./my-data/
# alignment_suffix .bam
# range 25-30
# force_design 20
# oligos2optimize None
# rrna_perc_threshold 5.0
# score_threshold 0.25
#### END of the given args ####
#### RUN started ####
#### WORKING IN /home/janm/Ribo-ODDR/output directory ####
#rRNA sequence read: snR7-L_snRNA 214 nts
#rRNA sequence read: snR14_snRNA 160 nts
#rRNA sequence read: snR6_snRNA 112 nts
...
#Allowed lengths for oligo designs: range(25, 31) nts
### Reading ncrna_mapped_sorted alignment file and getting depth profile.
# 12 primary-aligned reads on snR7-L_snRNA for sample ./my-data/ncrna_mapped_sorted.bam
# 5 primary-aligned reads on snR14_snRNA for sample ./my-data/ncrna_mapped_sorted.bam
# 0 primary-aligned reads on snR6_snRNA for sample ./my-data/ncrna_mapped_sorted.bam
# 30 primary-aligned reads on LSR1_snRNA for sample ./my-data/ncrna_mapped_sorted.bam
# 15 primary-aligned reads on snR19_snRNA for sample ./my-data/ncrna_mapped_sorted.bam
# 1 primary-aligned reads on snR7-S_snRNA for sample ./my-data/ncrna_mapped_sorted.bam
...
# 3 primary-aligned reads on snR41_snoRNA for sample ./my-data/ncrna_mapped_sorted.bam
# 2 primary-aligned reads on snR69_snoRNA for sample ./my-data/ncrna_mapped_sorted.bam
# 0 primary-aligned reads on snR53_snoRNA for sample ./my-data/ncrna_mapped_sorted.bam
# 13 primary-aligned reads on snR8_snoRNA for sample ./my-data/ncrna_mapped_sorted.bam
794106 rRNA mapping reads
# Oligo design starts now
# First locating suboptimal binding regions
# WARNING: /home/janm/Ribo-ODDR/RIsearch2_suboptimal_oligobind_results already exists
# Running RIsearch2 for length=25 oligos
# Running RIsearch2 for length=26 oligos
# Running RIsearch2 for length=27 oligos
# Running RIsearch2 for length=28 oligos
# Running RIsearch2 for length=29 oligos
# Running RIsearch2 for length=30 oligos
# Calculating oligo potentials
## Designing for size 25
## Designing for TX snR7-L_snRNA
## Designing for TX snR14_snRNA
## Designing for TX snR6_snRNA
## Designing for TX LSR1_snRNA
Traceback (most recent call last): finished)
File "src/Ribo-ODDR.py", line 609, in <module>
main()
File "src/Ribo-ODDR.py", line 476, in main
risearch=risearch_exe, rRNAs_suf=rRNAs_suf, working_dir=output_path)
File "src/Ribo-ODDR.py", line 267, in get_oligos_with_reads_start_end
read_basin = ALL_READS_START_END[sample][rt_tarTX][r]
IndexError: list index out of range
Hi, when I ran Ribo-ODDR.py using trimmed-read files, I used the following command (the arguments were successfully parsed) and got the following error message. I suspect that this might be because I ran this command under a conda environment where Python 3, Biopython 1.76 and pysam are installed, while TopHat v2.1.1 (the latest version) uses Python 2.7 (TopHat2 is installed on our campus cluster), so when TopHat2 was run using Python 3, some error occurred. I am wondering if there is any way to solve this problem. Thanks!
Command:
python Ribo-ODDR.py -r rRNA_20210321.fasta -o out -fp trimmed -fs .fq --bowtie2-build_exe d --samtools_exe d --tophat_exe d -s S1_trimmed --RIsearch2_exe d
Error message:
ERROR: File "/opt/apps/rhel7/tophat-2.1.1/bin/tophat", line 1003
except getopt.error, msg:
^
SyntaxError: invalid syntax
Oligo-selector crashes if target name contains colon.
The easiest repair is probably to replace
target=sapply(raw_df$target,FUN=function(x){return(strsplit(x,":")[[1]][1])}),
spos=as.numeric(sapply(raw_df$target,FUN=function(x){return(strsplit(strsplit(x,":")[[1]][2], "-")[[1]][1])})),
epos=as.numeric(sapply(raw_df$target,FUN=function(x){return(strsplit(strsplit(x,":")[[1]][2], "-")[[1]][2])})),
with
target=sapply(raw_df$target,FUN=function(x){return(strsplit(x,":(?=[^:]+$)",perl=TRUE)[[1]][1])}),
spos=as.numeric(sapply(raw_df$target,FUN=function(x){return(strsplit(strsplit(x,":(?=[^:]+$)",perl=TRUE)[[1]][2], "-")[[1]][1])})),
epos=as.numeric(sapply(raw_df$target,FUN=function(x){return(strsplit(strsplit(x,":(?=[^:]+$)",perl=TRUE)[[1]][2], "-")[[1]][2])})),
I.e. replace ":"
with ":(?=[^:]+$)",perl=TRUE
.
Dear author,
A little excited on your rRNA-deletion.
It's a very big troubled problem that too many rRNA residue in ribo-seq.
So, could the oligos in example_data been used directly in Ribo-seq experiment ?
Or, they are just a part.
Wish your reply.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.