Package: sencha
senchaWhat is sencha?Sencha is a Python package for directly translating RNA-seq reads into coding protein sequence.Free software: MIT licenseDocumentation:https://czbiohub.github.io/senchaThe name is inspired from the naming pattern ofsourmashcombined with@olgabot's love of tea.
(Senchais a Japanese green tea.)InstallationThe package can be installed from PyPI usingpiphere:pip install senchaDevelopmental installTo install this code and play around with the code locally, clone this github repository and usepipto install:git clone https://github.com/czbiohub/sencha.git
cd sencha

# The "." means "install *this*, the folder where I am now"
pip install .UsageExtract likely protein-coding reads from sequencing dataA reference proteomemustbe supplied as the first argument.sencha translate reference-proteome.fa.gz *.fastq.gz > coding_peptides.fastaSave the "coding scores" to a csv or parquet fileThe "coding score" of each read is calculated by translating each read in six
frames, then is calculatating theJaccard indexbetween any of the
six translated frames of the read and the peptide database. The final coding
score is the maximum Jaccard index across all reading frames. If you'd like to
see the coding scores for all reads, use the--csvflag or--parquetflag.csv:sencha translate --csv coding_scores.csv reference-proteome.fa.gz *.fastq.gz > coding_peptides.fastaparquet:sencha translate --parquet coding_scores.parquet reference-proteome.fa.gz *.fastq.gz > coding_peptides.fastaSave the coding nucleotides to a fastaBy default, only the codingpeptidesare output. If you'd like to also output
the underlyingnucleotidesequence, then use the flag--coding-nucleotide-fastasencha translate --coding-nucleotide-fasta coding_nucleotides.fasta reference-proteome.fa.gz *.fastq.gz > coding_peptides.fastaSave thenon-coding nucleotides to a fastaTo see the sequence of reads which were deemed non-coding, use the flag--noncoding-nucleotide-fasta.sencha translate --noncoding-nucleotide-fasta noncoding_nucleotides.fasta reference-proteome.fa.gz *.fastq.gz > coding_peptides.fastaSave the low complexity nucleotides to a fastaTo see the sequence of reads found to have too low complexity of nucleotide
sequence to evaluate, use the flag--low-complexity-nucleotide-fasta. Low
complexity is determined by the same method as the read trimmerfastpin which we calculate what
percentage of the sequence has consecutive runs of the same base,
or mathematically, how oftenseq[i] = seq[i+1]. The default threshold is0.3. As an example, the sequenceCCCCCCCCCACCACCACCCCCCCCACCCCCCCCCCCCCCCCCCCCCCCCCCACCCCCCCACACACCCCCAACACCCwould be considered low complexity. While this sequence has many nucleotide
k-mers, it is likely a result of a sequencing error and we ignore it.sencha translate --low-complexity-nucleotide-fasta low_complexity_nucleotides.fasta reference-proteome.fa.gz *.fastq.gz > coding_peptides.fastaSave the low complexity peptides to a fastaEven if the nucleotide sequence may pass the complexity filter, the peptide
sequence may still be low complexity. As an example, all translated frames of
the sequenceCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGCAGwould be considered low complexity, as it translates to eitherQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ(5'3' Frame 1),SSSSSSSSSSSSSSSSSSSSSSSSSSSSS(5'3' Frame 2),AAAAAAAAAAAAAAAAAAAAAAAAAAAAA(5'3' Frame 3 and 3'5' Frame 3),LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL(3'5' Frame 1),
orCCCCCCCCCCCCCCCCCCCCCCCCCCCCC(3'5' Frame 2). As these sequences have few
k-mers and are difficult to assess for how "coding" they are, we ignore them.
Unlike for nucleotides where we look at runs of consecutive bases, we require
the translated peptide to contain greater than(L - k + 1)/2k-mers, whereLis the length of the sequence andkis the k-mer size. To save the
sequence of low-complexity peptides to a fasta, use the flag--low-complexity-peptides-fasta.sencha translate --low-complexity-peptides-fasta low_complexity_peptides.fasta reference-proteome.fa.gz *.fastq.gz > coding_peptides.fastaHistory0.1.0 (2019-04-10)First release on PyPI.1.0.0 (2020-04-28)Sencha release on PyPI.