This pipeline is now deprecated, please use NanoSim to simulate both genomic and transcriptomic ONT reads!
Oxford nanopore transcriptome read simulator
Trans-NanoSim is a fast and scalable read simulator that captures the technology-specific features of ONT transcriptome reads (cDNA / directRNA), and allows for adjustments upon improvement of nanopore sequencing technology.
minimap2 (Tested with version 2.10)
LAST (Tested with version 581 and 916)
GenomeTools : http://genometools.org/
Python (2.7 or >= 3.4)
Python packages:
- six
- numpy (Tested with version 1.10.1 or above)
- HTSeq
- scipy (Tested with verson 1.0.0)
Trans-NanoSim is implemented using Python for error model fitting, read length analysis, and simulation. The first step of Trans-NanoSim is read characterization, which provides a comprehensive alignment-based analysis, and generates a set of read profiles serving as the input to the next step, the simulation stage. The simulation tool uses the model built in the previous step to produce in silico reads for a given reference transcriptome. It also outputs a list of introduced errors, consisting of the position on each read, error type and reference bases.
Characterization stage takes a reference transcriptome / reference genome and a training read set in FASTA format as input and aligns these reads to the references using minimap2 (default) or LAST aligner. User can also provide their own alignment file in SAM or MAF formats.
Usage:
./read_analysis.py <options>
[options]:
-h : print usage message
-i : training ONT reads (cDNA / directRNA), must be fasta files
-rg : reference genome of the training reads
-rt : reference transcriptome for the training reads
-annot : annotation file in ensembl GTF/GFF3 formats (required for Intron Retention modeling)
-a : Aligner to be used: minimap2 or LAST, default = 'minimap2'
-ga : genome alignment file in sam or maf format (optional)
-ta : transcriptome alignment file in sam or maf format (optional)
-o : The prefix of output files, default = 'training'
--no_model_fit : disable the modeling fitting step
--no_intron_retention : disable the Intron Retention modeling step
--detect_IR : detect Intron Retention events and outputs the markov model for it
--quantify : quantify transcripts expression profile
-
Simulation stage takes reference genome and read profiles as input and outputs simulated reads in FASTA fomat.
Usage:
./simulator.py [command] <options>
[command]:
circular | linear
# Do not choose 'circular' when there is more than one sequence in the reference
<options>:
-h : print usage message
-rt : reference transcriptome
-rg : reference genome
-e : expression profile in the specified format
-c : the prefix and address of training set profiles, same as the output prefix in read_analysis.py, default = training
-o : The prefix and address of output files, default = 'simulated'
-n : Number of generated reads, default = 20,000 reads
--perfect: Output perfect reads, no mutations, default = False
--KmerBias: prohibits homopolymers with length >= 6 bases in output reads, can be omitted
training_aligned_length_ecdf
Length distribution of aligned regions on aligned readstraining_aligned_reads_ecdf
Length distribution of aligned readstraining_align_ratio
Empirical distribution of align ratio of each readtraining_besthit.maf
The best alignment of each read based on lengthtraining_match.hist/training_mis.hist/training_del.hist/training_ins.hist
Histogram of match, mismatch, and indelstraining_first_match.hist
Histogram of the first match length of each alignmenttraining_error_markov_model
Markov model of error typestraining_ht_ratio
Empirical distribution of the head region vs total unaligned regiontraining.maf
The output of LAST, alignment file in MAF formattraining_match_markov_model
Markov model of the length of matches (stretches of correct base calls)training_model_profile
Fitted model for errorstraining_processed.maf
A re-formatted MAF file for user-provided alignment filetraining_unaligned_length_ecdf
Length distribution of unaligned readstraining_error_rate.tsv
Mismatch rate, insertion rate and deletion rate
-
simulated.log
Log file for simulation process -
simulated_reads.fasta
FASTA file of simulated reads. Each reads has "unaligned", "aligned", or "perfect" in the header determining their error rate. "unaligned" means that the reads have an error rate over 90% and cannot be aligned. "aligned" reads have the same error rate as training reads. "perfect" reads have no errors. -
simulated_error_profile
Contains all the information of errors introduced into each reads, including error type, position, original bases and current bases.