Skip to content
Bastian Eichenberger edited this page Apr 5, 2023 · 8 revisions

Welcome to the eFISHent wiki!

Contents

Installation

eFISHent can easily be installed using the bioconda-distributed package. To install conda/anaconda you can follow the installation procedure here. Then, in a new/custom environment (described here) install eFISHent using:

conda install -c bioconda efishent

FMI internal users can follow the server specific installation instructions here.

Alternatively, to get the nightly build you can directly install eFISHent from this repository. Only do this in case the latest bioconda release isn't yet up to date.

# Install other conda based dependencies
conda install -c bioconda bowtie blast jellyfish entrez-direct

# ONLY on linux!
conda install -c bioconda rnastructure

# Clone the repository
git clone https://github.com/BBQuercus/eFISHent.git
cd eFISHent/

# Install development version
pip install -e .

Getting genomes, annotations, count tables

For some of the steps described below, you'll need to provide a few key resources unique to your model organism/cell line:

  • Genome sequence and annotations
    • Go to the UCSC genome browser
    • Find your organism, typically select the Genome sequence files and select annotations option
    • For the actual genome, download the file ending in .fa.gz (which will have to be unzipped e.g. using gunzip)
    • For the annotation, it's typically in the genes/ directory ending in .gtf.gz (will also have to be unzipped)
  • Count table
    • Go to the GEO dataset search
    • Search for your organism/cell line followed by RNA-seq
    • Select a sample that you think will represent your data the best (make sure it's RNA-seq - sometimes the search isn't the best...)
    • Scroll down and, if available, under Supplementary file select any files ending in /FPKM/TPM/RPKMs.txt.gz or similar. Do not! download raw counts
    • Alternatively you can also visit the expression atlas - count tables there might need some minor editing beforehand though to ensure the required format of ensembl ID, count values in columns 1 and 2 respectively

Workflow

eFISHent works by iteratively selecting probes passing various filtering steps as outlined below:

  • A list of all candidate probes is generated from an input FASTA file containing the gene sequence. This sequence file can be passed manually or downloaded automatically from NCBI when providing a gene and species name -> options
  • The first round of filtering removes any probes not passing basic sequence-specific criteria including melting temperature as given formamide and salt concentrations, GC content, and G-quadruplets -> options
  • Probes are aligned to the reference genome using bowtie and candidates with off-targets are removed. In case of shorter genes or if off-targets are unavoidable, off-targets can be weighted using an encode count table to remove highly expressed genes -> options
  • The targets are divided into short k-mers and discarded if they appear above a determined threshold in the reference genome using Jellyfish -> options
  • The secondary structure of each candidate is predicted using a nearest neighbor thermodynamic model and filtered if the free energy is too high which could result in motifs hindering hybridization -> options
  • This gives the set of all viable candidates which are still overlapping. The final step is to use mathematical or greedy optimization to maximize probe non-overlapping coverage across the gene sequence -> options

Usage

Index building

While there is only one main workflow, the slightly more time-intensive index creation step can be run ahead of time. Indexes are unique to each reference genome and can be created using:

eFISHent\
    --reference-genome <path to genome fasta file>\
    --build-indices True

Passing gene sequence

The actual probe-creating workflow will then not only require the reference genome but also the sequence against which probes should be designed. Probes can be passed in one of three ways:

  • --sequence-file - Path to a fasta file containing the gene sequence
  • --ensembl-id (& --organism-name) - Ensembl ID of gene of interest. Will be downloaded from Entrez. The organism name can also be passed to avoid some wonky organism genes that have similar names but isn't required.
  • --gene-name & --organism-name - Instead of ensembl ID, both gene and organism name can be provided. The sequence will also be downloaded from Entrez.

Optimization options

There are two ways in which the final set of probe candidates that passed filtering can be assigned/selected using --optimization-method:

  • "greedy" - uses the next best possibility in line starting with the first probe. This has a time complexity of O(n) with n being the number of candidates. Therefore, even with very loosely set parameters and a lot of candidates, this will still be very fast. This is the default option.
  • "optimal" - uses a mathematical optimization model to yield highest coverage (number of nucleotides bound to a gene). This has a time complexity of O(n**2) meaning the more probes there are the exponentially slower it will get. Despite breaking the problem into chunks, this might be restrictively slow. However, you can set a time limit (--optimization-time-limit) to stop the optimization process after a given amount of seconds. The resultant probes will be the best ones found so far.

Off-target count table

To minimize the effect of off-targets, you can employ one of two strategies:

  • Off-target minimization - using the maximum off-target flag, you can specify the maximum number of off-target bindings in the genome. By default this is set to zero meaning there aren't any known off-targets. However, for shorter or more repetitive genes, this might pose an issue which is why you can also use...
  • Off-target weighting - if off-targets are unavoidable, you can provide three parameters to select how high their expression is allowed to get:
    • --reference-annotation - a GTF genome annotation file to know which genes correspond to which genomic loci
    • --encode-count-table - a csv or tsv file with any normalized RNA-seq count table format (FPKM, FPKM, TPM, etc.) as well as the encode ID matching the entries in the GTF file
    • --max-expression-percentage - the percentage of genes to be excluded sorted based on expression level (using the provided count table)

If you don't have your own RNA-seq dataset, you can download available datasets (make sure you're not using raw, but only normalized counts!) at Gene expression omnibus. Search for RNA-seq and the name of your organism/cell line. For example, searching for drosophila melanogaster will lead to this page where the "GSE206632_DESeq2_Results_RNAseq.csv.gz" file could be provided.

General filtering parameters

There are a bunch of parameters that can be set to adjust filtering steps. For some more information on example distributions of melting temperature, and deltaG read further below.

  • --min-length, --max-length & --spacing - Probe lengths in nucleotides and minimum distances between them.
  • --min-tm & --max-tm - Minimum and maximum possible melting temperature (will be affected by length, GC content and formamide/na concentration).
  • --min-gc & --max-gc - GC content in percentage.
  • --formamide-concentration - Percentage of formamide in buffer.
  • --na-concentration - Sodium ion concentration in mM.
  • --kmer-length & --max-kmers - Jellyfish-based short-mer filtering. If candidate probes contain kmers of length --kmer-length than are found more than --max-kmers in the reference genome, the candidate will get discarded.
  • --max-deltag - Predicted secondary structure.
  • --sequence-similarity - Will remove probes that might potentially bind to each other (set the similarity to the highest allowed binding percentage). Will reduce the number of probes because (due to otherwise exceptionally high runtimes) has to be run after optimization.

TODO - add distributions.

Remaining but important options

There are a few options not covered so far:

  • --is-plus-strand & --is-endogenous - Set true/false depending on gene of interest.
  • --threads - Wherever multiprocessing is, spawn that many threads. Set this to as many cores as you have available.
  • --save-intermediates - Save all intermediary files. Can be used to gauge which filtering steps are set too aggressively.
  • --verbose - Set to get some more information on progress.

Output

By default eFISHent will output three unique files:

  • GENE_HASH.fasta - all probes in fasta format for subsequent usage.
  • GENE_HASH.csv - a table containing all probes as well as basic parameters (such as melting temperature).
  • GENE_HASH.txt - a configuration file to check which parameters were used during the run as well as the command to start it.

GENE is a reinterpreted gene name dependent on the options passed but should be immediately clear as to where it's from. The HASH is a unique set of characters that identifies the parameters passed for the run. This way, if and only if the same parameters are passed again eFISHent doesn't have to rerun anything. All intermediary files during the run will be saved in the same format but will get deleted at the end unless --save-intermediates is set to true.

Full examples

First, the indexes for the respective genome have to be built:

eFISHent\
    --reference-genome ./hg-38.fa\
    --build-indices True

An example to create 45 to 50-mers for a gene of interest downloaded from Entrez:

eFISHent\
    --reference-genome ./hg-38.fa\
    --gene-name "norad"\
    --organism-name "homo sapiens"\
    --is-plus-strand True\
    --optimization-method optimal\
    --min-length 45\
    --max-length 50\
    --formamide-concentration 45\
    --threads 8

Another example using a custom sequence:

eFISHent\
    --reference-genome ./dm6.fa\
    --sequence-file "./renilla.fasta"\
    --is-endogenous False\
    --threads 8

Lastly, an example with off-target weighting:

eFISHent\
    --reference-genome ./hg-38.fa\
    --reference-annotation ./hg-38.gtf\
    --ensembl-id ENSG00000128272\
    --organism-name "homo sapiens"\
    --is-plus-strand False\
    --max-off-targets 5\
    --encode-count-table ./count_table.tsv\
    --max-expression-percentage 20\
    --threads 8

FAQ