Package: bp-quant
bp-quantQuantification of reads at defined positions to verify custom input sequences.Given a gene fusion or splicing junction of interest, this tool can quantify
RNA-seq reads supporting the breakpoint (or splice junction) by quantifying
reads that map to the breakpoint (junction reads) and read pairs that span the
breakpoint (spanning pairs).WorkflowInput:Table with target sequences and breakpoints position (CSV/TSV format)fastq files / BAM file (BAM input only works in combination with STAR as aligner)Convert target sequences to FASTA format (bp_quant csv2fasta)Map reads against sequences using STAR/Bowtie2/BWAGenerate Index of sequences as reference (bp_quant index)Map reads (bp_quant align)Count reads usingbp_quant countOutput:Table with read counts per input sequenceTable with info on each read (read_info.tsv)DependenciesLook at thisenvironment.ymlfor the individual dependencies (Hint: File can also be used to build conda environment).Installation# Create conda environment from above or add the dependencies to your path
pip install bp-quantAlternatively, bp-quant can be installed fromgithub repository:git clone https://github.com/TRON-Bioinformatics/easyquant.git

cd easyquant

# If you have conda installed you can simply install the environment like this
conda env create -f environment.yml --prefix conda_env/
conda activate conda_env/

python -m build
pip install dist/*.whlUsageusage: bp_quant pipeline [-h] [-1 FQ1] [-2 FQ2] [-b BAM] -s SEQ_TAB -o
                         OUTPUT_FOLDER [-d BP_DISTANCE] [--allow_mismatches]
                         [--interval_mode] [-m {star,bowtie2,bwa}]
                         [-t NUM_THREADS] [--star_cmd_params STAR_CMD_PARAMS]
                         [--keep_aln | --keep_all]

Runs the complete bpquant pipeline

optional arguments:
  -h, --help            show this help message and exit
  -1 FQ1, --fq1 FQ1     Specify path to Read 1 (R1) FASTQ file
  -2 FQ2, --fq2 FQ2     Specify path to Read 2 (R2) FASTQ file
  -b BAM, --bam_file BAM
                        Specify path to input BAM file as alternative to FASTQ
                        input
  -s SEQ_TAB, --sequence_tab SEQ_TAB
                        Specify the reference sequences as table with colums
                        name, sequence, and position
  -o OUTPUT_FOLDER, --output_folder OUTPUT_FOLDER
                        Specify the folder to save the results into.
  -d BP_DISTANCE, --bp_distance BP_DISTANCE
                        Threshold in base pairs for the required overlap size
                        of reads on both sides of the breakpoint for
                        junction/spanning read counting
  --allow_mismatches    Allow mismatches within the region around the
                        breakpoint determined by the bp_distance parameter
  --interval_mode       Specify if interval mode shall be used
  -m {star,bowtie2,bwa}, --method {star,bowtie2,bwa}
                        Specify alignment software to generate the index
  -t NUM_THREADS, --threads NUM_THREADS
                        Specify number of threads to use for the alignment
  --star_cmd_params STAR_CMD_PARAMS
                        Specify STAR commandline parameters to use for the
                        alignment
  --keep_aln            Do not delete alignment files during clean up step
  --keep_all            Do not perform clean up step after re-quantification

Copyright (c) 2023 TRON gGmbH (See LICENSE for licensing details)Use case with example dataWe use toy example data from the folderexample_data. It consists of a table
with input sequences and positions, as well as two fastq files / one BAM file.Fastqs as input:bp_quant pipeline \
  -1 example_data/example_rna-seq_R1_001.fastq.gz \
  -2 example_data/example_rna-seq_R1_001.fastq.gz \
  -s example_data/CLDN18_Context_seq.csv \
  -d 10 \
  -o example_out \
  -m star \
  -t 6
  [--interval_mode]BAM as input:bp_quant pipeline \
  -b example_data/example_rna-seq.bam \
  -s example_data/CLDN18_Context_seq.csv \
  -d 10 \
  -o example_out \
  -m star \
  -t 6
  [--interval_mode]InputTable with input sequencesAs input a CSV/TSV table should be given holding the target sequence
with unique names and the relative position(s) of the breakpoint(s)/intervals or fusion junction.Example format of the input table:namesequencepositionseq1AACCGCCACCG5seq2GTCCGTTGGCG5seq3AACCGCCCTGT5seq4CGGCATCATCG0,5,10Fastq files / BAM filePaired fastq files or an unsorted BAM file (no multimappers) as input is required
to successfully determine read classes as described below.Config fileOutput formatThe main output consists of the file:<OUTPUT_FOLDER>/quantification.tsvcontains raw read counts for each sequenceThe output of the example data<OUTPUT_FOLDER>/quantification.tsvusing a mismatch ratio of 0.05 (default) should look like this:nameposjuncspananchabCLDN18_14005706842511093932CLDN18_236101012968CLDN18_total4005936882543154990CLDN18_1_fake40003033946CLDN18_2_fake36100003943HPRT1400107215251259974Using the interval mode the output will look slightly different:nameintervaloverlap_interval_end_readsspan_interval_end_pairswithin_intervalcoverage_perccoverage_meancoverage_medianCLDN18_10_40057068411090.89182.71137.5CLDN18_1400_7860039321.0519.51563.5CLDN18_20_3610110.140.140.0CLDN18_2361_7470029681.0392.15425.5CLDN18_total0_40059368843151.0586.16682.0CLDN18_total400_7860049901.0659.15757.5CLDN18_1_fake0_4000330.160.380.0CLDN18_1_fake400_7860039461.0521.23551.5CLDN18_2_fake0_3610000.00.00.0CLDN18_2_fake361_7470039431.0520.83551.0HPRT10_40010721512591.0167.77175.0HPRT1400_793009740.98126.40101.0Columns in output fileWhile not using interval modenamename of the input sequenceposposition of interest relative to input sequencejuncreads overlapping the position of interestspanread pairs spanning the position of interestanchmaximal number of bases next to position of interest that are overlaped by a single readareads mapping to sequence left of the position of interestbreads mapping to sequence right of the position of interestWhile using interval modenamename of the input sequenceintervalinterval of interest relative to input sequenceoverlap_interval_end_readsreads overlapping the end of the interval by at leastBP_DISTANCEbasesspan_interval_end_pairsread pairs spanning the end of the intervalwithin_intervalreads mapping fully onto the intervalcoverage_percpercentual coverage of the interval by aligned readscoverage_meanaverage coverage per base for the interval (fold coverage)coverage_medianmedian coverage per base for the interval