# stringtie **Repository Path**: youpu2020/stringtie ## Basic Information - **Project Name**: stringtie - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-14 - **Last Updated**: 2023-11-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![alt text](https://img.shields.io/badge/License-MIT-blue.svg "MIT License") ## StringTie: efficient transcript assembly and quantitation of RNA-Seq data Stringtie employs efficient algorithms for transcript structure recovery and abundance estimation from bulk RNA-Seq reads aligned to a reference genome. It takes as input spliced alignments in coordinate-sorted SAM/BAM/CRAM format and produces a GTF output which consists of assembled transcript structures and their estimated expression levels (FPKM/TPM and base coverage values). For additional StringTie documentation and the latest official source and binary packages please refer to the official website: ## Obtaining and installing StringTie Source and binary packages for this software can be directly downloaded from the [Releases](https://github.com/gpertea/stringtie/releases) page for this repository. StringTie is compatible with a wide range of Linux and Apple OS systems. The main program (StringTie) does not have any other library dependencies (besides zlib) and in order to compile it from source it requires a C++ compiler which supports the C++ 11 standard (GCC 4.8 or newer). ### Building the latest version from the repository In order to compile the StringTie source in this GitHub repository the following steps can be taken: ``` git clone https://github.com/gpertea/stringtie cd stringtie make release ``` During the first run of the above make command a few library dependencies will be downloaded and compiled, but any subsequent stringtie updates (using `git pull`) should rebuild much faster. To complete the installation, the resulting `stringtie` binary can then be copied to a programs directory of choice (preferably one that is in the current shell's PATH). Building and installing of StringTie this way should take less than a minute on a regular Linux or Apple MacOS desktop. Note that simply running `make` would produce a less optimized executable which is suitable for debugging and runtime checking but that is significantly slower than the optimized version which is built by using the `make release` command as instructed above. ### Using pre-compiled (binary) releases Instead of compiling from source, some users may prefer to download an already compiled binary for Linux and Apple MacOS, ready to run. These binary package releases are compiled on older versions of these operating systems in order to provide compatibility with a wide range of OS versions not just the most recent distributions. These precompiled packages are made available on the Releases page for this repository. Please note that these binary packages do not include the optional [super-reads module](#the-super-reads-module), which currently can only be built on Linux machines from the source made available in this repository. ## Running StringTie The generic command line for the default usage has this format: ``` stringtie [-o ] [other_options] ``` The main input of the program (__) must be a SAM, BAM or CRAM file with RNA-Seq read alignments sorted by their genomic location (for example the `accepted_hits.bam` file produced by TopHat, or HISAT2 output sorted with `samtools sort` etc.). The main output is a GTF file containing the structural definitions of the transcripts assembled by StringTie from the read alignment data. The name of the output file should be specified with the `-o` option. If this `-o` option is not used, the output GTF with the assembled transcripts will be printed to the standard output (and can be captured into a file using the `>` output redirect operator). __Note__: if the `--mix` option is used, StringTie expects two alignment files to be given as positional parameters, in a specific order: the short read alignments must be the first file given while the long read alignments must be the second input file. Both alignment files must be sorted by genomic location. ``` stringtie [-o ] --mix [other_options] ``` Note that the command line parser in StringTie allows arbitrary order and mixing of the positional parameters with the other options of the program, so the input alignment files can also precede or be given in between the other options -- the following command line is equivalent to the one above: ``` stringtie --mix [other_options] [-o ] ``` ### Running StringTie on the provided test/demo data When building from this source repository, after the program was compiled with `make release` as instructed above, the generated binary can be tested on a small data set with a command like this: ``` make test ``` This will run the included `run_tests.sh` script which downloads a small test data set and runs a few simple tests to ensure that the program works and generates the expected output. If a pre-compiled package is used instead of compiling the program from source, the `run_tests.sh` script is included in the binary package as well and it can be run immediately after unpacking the binary package: ``` tar -xvzf stringtie-2.2.0.Linux_x86_64.tar.gz cd stringtie-2.2.0.Linux_x86_64 ./run_tests.sh ``` These small test/demo data sets can also be downloaded separately as test_data.tar.gz along with the source package and pre-compiled packages on the Releases page of this repository. The tests can also be run manually as shown below (after changing to the _test_data_ directory, `cd test_data`): #### Test 1: Input consists of only alignments of short reads ``` stringtie -o short_reads.out.gtf short_reads.bam ``` #### Test 2: Input consists of alignments of short reads and superreads ``` stringtie -o short_reads_and_superreads.out.gtf short_reads_and_superreads.bam ``` #### Test 3: Input consists of alignments of long reads ``` stringtie -L -o long_reads.out.gtf long_reads.bam ``` #### Test 4: Input consists of alignments of long reads and reference annotation (guides) ``` stringtie -L -G human-chr19_P.gff -o long_reads_guided.out.gtf long_reads.bam ``` #### Test 5: Input consists of alignments of short reads and alignments of long reads (using `--mix` option) ``` stringtie --mix -o mix_reads.out.gtf mix_short.bam mix_long.bam ``` #### Test 6: Input consists of alignments of short reads, alignments of long reads and a reference annotation (guides) ``` stringtie --mix -G mix_guides.gff -o mix_reads_guided.out.gtf mix_short.bam mix_long.bam ``` These tests should complete in several seconds. For large data sets one can expect up to one hour of processing time. A minimum of 8GB of RAM is recommended for running StringTie on regular size RNA-Seq samples, with 16 GB or more being strongly advised for larger data sets. ### StringTie options The following optional parameters can be specified (use `-h` or `--help` to get the usage message): ``` --mix : both short and long read data alignments are provided (long read alignments must be the 2nd BAM/CRAM input file) --rf : assume stranded library fr-firststrand --fr : assume stranded library fr-secondstrand -G reference annotation to use for guiding the assembly process (GTF/GFF) --conservative : conservative transcript assembly, same as -t -c 1.5 -f 0.05 --ptf : load point-features from a given 4 column feature file -o output path/file name for the assembled transcripts GTF (default: stdout) -l name prefix for output transcripts (default: STRG) -f minimum isoform fraction (default: 0.01) -L long reads processing; also enforces -s 1.5 -g 0 (default:false) -R if long reads are provided, just clean and collapse the reads but do not assemble -m minimum assembled transcript length (default: 200) -a minimum anchor length for junctions (default: 10) -j minimum junction coverage (default: 1) -t disable trimming of predicted transcripts based on coverage (default: coverage trimming is enabled) -c minimum reads per bp coverage to consider for multi-exon transcript (default: 1) -s minimum reads per bp coverage to consider for single-exon transcript (default: 4.75) -v verbose (log bundle processing details) -g maximum gap allowed between read mappings (default: 50) -M fraction of bundle allowed to be covered by multi-hit reads (default:1) -p number of threads (CPUs) to use (default: 1) -A gene abundance estimation output file -E define window around possibly erroneous splice sites from long reads to look out for correct splice sites (default: 25) -B enable output of Ballgown table files which will be created in the same directory as the output GTF (requires -G, -o recommended) -b enable output of Ballgown table files but these files will be created under the directory path given as -e only estimate the abundance of given reference transcripts (requires -G) --viral : only relevant for long reads from viral data where splice sites do not follow consensus (default:false) -x do not assemble any transcripts on the given reference sequence(s) -u no multi-mapping correction (default: correction enabled) --ref/--cram-ref reference genome FASTA file for CRAM input Transcript merge usage mode: stringtie --merge [Options] { gtf_list | strg1.gtf ...} With this option StringTie will assemble transcripts from multiple input files generating a unified non-redundant set of isoforms. In this mode the following options are available: -G reference annotation to include in the merging (GTF/GFF3) -o output file name for the merged transcripts GTF (default: stdout) -m minimum input transcript length to include in the merge (default: 50) -c minimum input transcript coverage to include in the merge (default: 0) -F minimum input transcript FPKM to include in the merge (default: 1.0) -T minimum input transcript TPM to include in the merge (default: 1.0) -f minimum isoform fraction (default: 0.01) -g gap between transcripts to merge together (default: 250) -i keep merged transcripts with retained introns; by default these are not kept unless there is strong evidence for them -l