comparison pre_process_protein_name_set.R @ 32:63008bdf576e draft

Uploaded
author bornea
date Tue, 26 Apr 2016 17:16:03 -0400
parents e6e456d3ac14
children
comparison
equal deleted inserted replaced
31:761e1ad2b130 32:63008bdf576e
78 peptides_txt_mapped_log2[peptides_txt_mapped_log2 == -Inf] <- NA 78 peptides_txt_mapped_log2[peptides_txt_mapped_log2 == -Inf] <- NA
79 #uniprot accessions WITHOUT isoforms; it looks like only contaminants contain isoforms anyways. 79 #uniprot accessions WITHOUT isoforms; it looks like only contaminants contain isoforms anyways.
80 mapped_protein_uniprotonly = str_extract(peptides_txt_mapped_log2$Uniprot,"[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}") 80 mapped_protein_uniprotonly = str_extract(peptides_txt_mapped_log2$Uniprot,"[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}")
81 mapped_protein_uniprot_accession = str_extract(peptides_txt_mapped_log2$Uniprot,"[OPQ][0-9][A-Z0-9]{3}[0-9](-[0-9]+)?|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}(-[0-9]+)?|[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}") 81 mapped_protein_uniprot_accession = str_extract(peptides_txt_mapped_log2$Uniprot,"[OPQ][0-9][A-Z0-9]{3}[0-9](-[0-9]+)?|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}(-[0-9]+)?|[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}")
82 peptides_txt_mapped_log2$mapped_protein = mapped_protein_uniprotonly 82 peptides_txt_mapped_log2$mapped_protein = mapped_protein_uniprotonly
83 names_db = str_extract(swissprot_fasta,"[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}")
84 names_db = names_db[!is.na(names_db)]
83 # Runs the Tukey function returning completed table. 85 # Runs the Tukey function returning completed table.
84 peptides_txt_mapped_log2 = subset(peptides_txt_mapped_log2,mapped_protein %in% swissprot_fasta) 86 peptides_txt_mapped_log2 = subset(peptides_txt_mapped_log2,mapped_protein %in% names_db)
85 if (nrow(peptides_txt_mapped_log2) == 0) { 87 if (nrow(peptides_txt_mapped_log2) == 0) {
86 print("Uniprot Database does not have any of the proteins in the peptides file") 88 print("Uniprot Database does not have any of the proteins in the peptides file")
87 quit() 89 quit()
88 } 90 }
89 protein_intensities_tukeys = get_protein_values(peptides_txt_mapped_log2,intensity_columns) 91 protein_intensities_tukeys = get_protein_values(peptides_txt_mapped_log2,intensity_columns)