Package: scanexitronlr
ScanExitronLRA computational workflow for exitron splicing identification in long-read RNA-seq data.InstallationThe recommended way to installScanExitronLRis usingpip:$pipinstallscanexitronlrThis will pull and install the latest stable release fromPyPi. ScanExitronLR requires Python 3.7+. Thus you need to make sure that thepipis for python3 using e.g.which pipor using:$pip3installscanexitronlrTo test your installation, run:$selrYou should see the version number, usage instructions and commands. (If you prefer a more descriptive commandscanexitronlralso works.)NOTE: ScanExitronLR uses the LIQA package to infer exitron specific transcript abundance. Currently, LIQA sometimes crashes with newest versions of the lifelines package.  To avoid this, install version v0.26.4 of lifelines withconda install lifelines=v0.26.4.UsageScanExitronLR has two modes,extractandannotate. Useextractwhen calling exitrons in an alignment andannotatewhen annotating exitrons called usingextract.Extractextractrequires three inputs: (1) a BAM alignment file of long-reads containing the ts:A flag (provided by default by Minimap2), (2) a reference genome and (3) a sorted and bgzip'd gene annotation file. Currently only gtf files are supported. We suggest using the--junc-bedparameter in minimap2 for more accurate spliced alignments.  Without the parameter, it may be harder to distinguish unannoted exitron splicing events from annotated splicing events.To sort your gtf file, use the command:$awk'$1 ~ /^#/ {print $0;next} {print $0 | "sort -k1,1 -k4,4n -k5,5n"}'in.gtf>out_sorted.gtfTo bgzip your gene annotation file, use:$bgzipin.gtfbgzipis part of thehtslib, which you most likely already have installed if you care about BAM files. Otherwise, you can get ithere. It is important to note that if you download thelatest GENCODE releaseit will be in the gzip form, not bgzip. You will need to rungzip -dand thenbgzip.ScanExitronLR utilizes thegffutilspackage, which requires an SQL-lite database of the annotation file. You do not need to provide such a file, as ScanExitronLR will create one if one is not found, though it may take ~20 minutes to build. It will be saved asyour_annotation.gtf.gz.dbin the same location as your annotation and will not need to be built again. In addition, we require a tabix index, and it will be created if one is not found. This should only take seconds. It will be saved asyour_annotation.gtf.gz.tbi.Thus, if you are running ScanExitronLR on a shared server and using a shared annotation database, you may not have writing privelages in the shared space. You will need to copy your annotation file to your local directory.We have provided fully processed GTF files forGencode V39andTAIR10for your convenience.To run ScanExitronLR in extract mode, simply run$selrextract...with the following parameters:ParameterDescription-i STRREQUIRED: Input BAM file-g STRREQUIRED: Input genome reference (e.g. hg38.fa)-r STRREQUIRED: Inputsortedand bgzip'd annotation reference (e.g. gencode_v38_sorted.gtf.gz).-o STROutput filename (e.g. bam_filename.exitron <- this is default)-a/--ao INTReports only exitrons with AO (# of supporting reads) of INT or above (default: 2).-p/--pso FLOATReports only exitrons with PSO of FLOAT or above (default: 0.01).-c/--cores INTUse INT cores (default: 1). Use as many as you can spare. Even large BAM files only use at most 4GB total memory on 10 cores.-cp/--cluster-purity FLOATReports only exitrons with cluster purity of FLOAT or above (default: 0).-m/--mapq INTOnly considers reads with mapq score >= INT (default: 50)-j/--jitter INTTreat splice-sites with fuzzy boundry of +/- INT (default: 10).-srUse this flag to skip the realignment step.-saUse this flag to save isoform abundance files for downstream differential isoform usage analysis with LIQA. Files are of the form: input.isoform.exitrons, input.isoform.normals (See example page)We provide some functionality to perform exitron differential isoform usage with the-saflag.  Seeherefor an example.Choosing Filtering ParametersScanExitronLR filters exitron splicing events based on AO (-a/--ao), PSO (-p/--pso) and cluster purity (-cp/--cluster-purity):AO. By default, ScanExitronLR only reports exitrons with at least two supporting reads (AO >= 2). This is filter out random sequencing errors that may lead to a faulty alignment and false splicing event. However, if the coverage is particularly low, you may need to set the AO threshold to 1 in order to detect exitrons in medium and lower expressed genes.PSO. By default, ScanExitronLR only reports exitrons with a splicing frequence (PSO) above 1%. Splicing events below this frequency may not be biologically relevant or may just be due to splicing noise. Setting PSO filtering to 0% is not recommended because it will increase running time and report many low quality splicing events.Cluster Purity. By default, ScanExitronLR does not filter by cluster purity.  However, cluster purity is important for having high confidence the the reported splice sites. For example, if the cluster purity is 90%, then 90% of the exitron spliced reads have the reported splice sites. Thus, one ought to be cautious when investigating exitrons with cluster purities below 50%. There is an exitron splicing event being detected, but it is unclear where the exact splice sites occur. This can happen if the reads are particularly noisy or are aligned to a repetitive region.AnnotateTo run ScanExitronLR in annotate mode, simply run$selrannotate...with the following parameters:parametersDescription-i STRREQUIRED: Input exitron file, generated from selr extract-g STRREQUIRED: Input genome reference (e.g. hg38.fa)-r STRREQUIRED: Inputsortedand _ gzip'd_ annotation reference (e.g. gencode_v38_sorted.gtf.gz).-o STROutput filename (e.g. bam_filename.exitron.annotation <- this is default)-b/--bam-file STRIf specified, annotation includes read supported NMD status directly from alignments.-arabidopsisUse this flag if using alignments from Arabidopsis. See github page for annotation file/genome assumptions.The output is a tab-separated file with the following columns:ColumnDescriptionchromChromosome namestartExitron startendExitron endnameUnique exitron identifierregionExitron regionao# of supporting readsstrandGene strandgene_nameGene name from annotationgene_idGene ID from annotationlengthExitron legnthsplice_siteExitron splice sites (G[T/C]-AG, AT-AC)transcript_idTranscript ID from annotationpsoExitron percent spliced out valuedpTotal depth at exitron position (PSO = AO/DP)cluster_purityExitron cluster purityexitron_prot_positionPosition in amino acid sequence of exitron splicing eventtypeExitron type (frameshift/truncation/truncation+substitution)substitutionIf from substitution type, determines which amino acid substitution occurednmd_status_predictedIf frameshift type, determines if a downstream stop codon is 50 nt upstream of splicing junctionnmd_status_percentageIf frameshift type, reports percentage of reads that directly support a stop codon 50 nt upstream of splicing junctiondownstream_inframe_AUGIf frameshift type, reports whether there is a downstream AUG, usually attenuating NMD efficiencystart_proximal_PTCIf frameshift type, reports whether premature stop codon is within 200 nt of start codon, usually attenuating NMD efficiencyprot_domainsAny PFAM domains that are disrupted by the exitron splicingreadsName of all reads which are exitron splicedScanExitronLRmay assign transcript abundance to multiple annotated transcripts. If this is the case, each transcript will get an annotation. Thus, if an exitron is associated with two transcripts, there will be two rows in the annotation output, one for each transcript.ExampleSeeherefor an example.ContactPlease feel free to post any issues here on github.Citation@article{Fry_ScanExitronLR_characterization_and_2022,author={Fry, Joshua P and Li, Yang Yang and Yang, Ren Dong},doi={10.1101/2022.03.25.485864},journal={bioRxiv},month={3},number={1},pages={1--7},title={{ScanExitronLR: characterization and quantification of exitron splicing events in long-read RNA-seq data}},volume={1},year={2022}}