From 60514a53fca07a018d33342ec633e4c28dffba02 Mon Sep 17 00:00:00 2001 From: "Abolfazl (Abe)" <53412130+abearab@users.noreply.github.com> Date: Thu, 3 Nov 2022 22:47:04 -0700 Subject: [PATCH 1/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6696874..2b38b8c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Input files: - Necessary: - `rna_fastafile`: a fasta file with RNA sequences of interest - `exp_values_file`: expression values in a csv format. It should have 2 or more columns, one column with names of of sequences, another column with values. The names of these two columns have to be specified with the `--anno_name_column` and `--measur_column` arguments. All the names of the sequences listed in this file must also have a corresponding sequence record in the fasta file provided with `rna_fastafile`. The measurement values might be integer or float numbers. - - `seeds_file`: a binary file containing the seeds to search through. Such file can be created with `seed_generator.py` script + - `seeds_file`: a binary file containing the seeds to search through. Such file can be created with `seeds_generator.py` script - Optional: - user can include a file with RNA structure probing data (SHAPE or DMS-seq) to guide the possible match selection. There is no commonly used standard format for SHAPE RNA reactivity data; therefore, we are using the two-column SHAPE file format used by RNAstructure package ([link](https://rna.urmc.rochester.edu/Text/File_Formats.html#SHAPE)). SHAPE file provided by user should contain SHAPE profiles for multiple sequences, separated with `>`, like in fasta file. SHAPE file can be provided to the `filter_profiles_by_folding.py` script with the `--shape_profile` argument @@ -97,7 +97,7 @@ Arguments for the automatic pipeline (parameters for all the individual steps in - `jackknife_n_samples`: how many permutations to do in jackknife test - `jackknife_fraction_retain`: what fraction of the sample to retain for each test - `jackknife_min_fraction_passed`: what fraction of all iterations should -- arguments for `seed_generator.py` script +- arguments for `seeds_generator.py` script - `outfolder`: output folder - `prefix`: prefix for naming the seed file - `num_motifs_per_file`: maximal number of seeds to write into a single file From ceb8fd0a8f090b3205b6d9d35ed2f0cc6e22c8ef Mon Sep 17 00:00:00 2001 From: "Abolfazl (Abe)" <53412130+abearab@users.noreply.github.com> Date: Thu, 3 Nov 2022 22:55:29 -0700 Subject: [PATCH 2/4] Update seeds_generator.py https://stackoverflow.com/a/22091228 --- pyteiser/seeds_generator.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pyteiser/seeds_generator.py b/pyteiser/seeds_generator.py index d8d8088..6c47ab4 100644 --- a/pyteiser/seeds_generator.py +++ b/pyteiser/seeds_generator.py @@ -3,8 +3,17 @@ import os import sys -from . import glob_var -from . import structures + try: + from . import glob_var + except: + import glob_var + + try: + from . import structures + except: + import structures + + # this function generates all possible seeds with specified length of stem and loop # to reduce the search space, it only keeps the seeds that have a pre-specified number of informative bases (non-Ns) From f0b8a3f939ef8e59fd8301c6db46379ca16f1bc1 Mon Sep 17 00:00:00 2001 From: abearab Date: Thu, 3 Nov 2022 22:58:46 -0700 Subject: [PATCH 3/4] edit import --- pyteiser/seeds_generator.py | 11 ++--------- pyteiser/structures.py | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pyteiser/seeds_generator.py b/pyteiser/seeds_generator.py index 6c47ab4..58ae4ef 100644 --- a/pyteiser/seeds_generator.py +++ b/pyteiser/seeds_generator.py @@ -3,15 +3,8 @@ import os import sys - try: - from . import glob_var - except: - import glob_var - - try: - from . import structures - except: - import structures +import glob_var +import structures diff --git a/pyteiser/structures.py b/pyteiser/structures.py index 2858f74..0546456 100644 --- a/pyteiser/structures.py +++ b/pyteiser/structures.py @@ -4,7 +4,7 @@ import struct import sys -from . import glob_var +import glob_var class w_motif: @@ -531,4 +531,4 @@ def copy_n_motif(motif): motif_copy = n_motif(motif.stem_length, motif.loop_length, copy_sequence, copy_structure) - return motif_copy \ No newline at end of file + return motif_copy From 96409b20fa139cebadd85f6f8de95b7569a9dc70 Mon Sep 17 00:00:00 2001 From: "Abolfazl (Abe)" <53412130+abearab@users.noreply.github.com> Date: Thu, 3 Nov 2022 23:44:30 -0700 Subject: [PATCH 4/4] `csv` -> `tsv` --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b38b8c..97afac4 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Depending on the size of sequence set and on desired number of seeds to be analy Input files: - Necessary: - `rna_fastafile`: a fasta file with RNA sequences of interest - - `exp_values_file`: expression values in a csv format. It should have 2 or more columns, one column with names of of sequences, another column with values. The names of these two columns have to be specified with the `--anno_name_column` and `--measur_column` arguments. All the names of the sequences listed in this file must also have a corresponding sequence record in the fasta file provided with `rna_fastafile`. The measurement values might be integer or float numbers. + - `exp_values_file`: expression values in a tsv format. It should have 2 or more columns, one column with names of of sequences, another column with values. The names of these two columns have to be specified with the `--anno_name_column` and `--measur_column` arguments. All the names of the sequences listed in this file must also have a corresponding sequence record in the fasta file provided with `rna_fastafile`. The measurement values might be integer or float numbers. - `seeds_file`: a binary file containing the seeds to search through. Such file can be created with `seeds_generator.py` script - Optional: - user can include a file with RNA structure probing data (SHAPE or DMS-seq) to guide the possible match selection. There is no commonly used standard format for SHAPE RNA reactivity data; therefore, we are using the two-column SHAPE file format used by RNAstructure package ([link](https://rna.urmc.rochester.edu/Text/File_Formats.html#SHAPE)). SHAPE file provided by user should contain SHAPE profiles for multiple sequences, separated with `>`, like in fasta file. SHAPE file can be provided to the `filter_profiles_by_folding.py` script with the `--shape_profile` argument @@ -69,7 +69,7 @@ pyteiser_pipeline --rna_fastafile --exp_values_file