get_annot_from_fasta

Description

get_annot_from_fasta

Usage

get_annot_from_fasta(
  fasta.files,
  pattern_decoys = "^REV_|^rev_",
  isUniprot = TRUE,
  min_length = 7,
  max_length = 30,
  include_seq = FALSE
)

Arguments

fasta.files path to fasta file(s) or connection
pattern_decoys regex for decoy sequence IDs
isUniprot if TRUE parse UniProt-style headers
min_length minimum tryptic peptide length
max_length maximum tryptic peptide length
include_seq if TRUE include protein sequences

Examples

library("prolfquapp")

fasta_text <- c(
  ">sp|P00001|TEST Protein OS=Human GN=TEST PE=1 SV=1",
  "MKRISTTITTT",
  ">REV_sp|P00002|DECOY Protein OS=Human GN=DECOY PE=1 SV=1",
  "MPEPTIDER"
)
fasta_conn <- textConnection(fasta_text)
get_annot_from_fasta(fasta_conn, pattern_decoys = "^REV_")
                               fasta.id                        fasta.header
sp|P00001|TEST           sp|P00001|TEST  Protein OS=Human GN=TEST PE=1 SV=1
REV_sp|P00002|DECOY REV_sp|P00002|DECOY Protein OS=Human GN=DECOY PE=1 SV=1
                    proteinname gene_name protein_length nr_tryptic_peptides
sp|P00001|TEST           P00001      TEST             11                   1
REV_sp|P00002|DECOY      P00002     DECOY              9                   1
close(fasta_conn)