library(readxl)
## Warning: package 'readxl' was built under R version 4.2.3
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.2.3
library(ggrepel)
## Warning: package 'ggrepel' was built under R version 4.2.3
library(sqldf)
## Loading required package: gsubfn
## Loading required package: proto
## Loading required package: RSQLite
## Warning: package 'RSQLite' was built under R version 4.2.3
library(Rcpp)
library(biomaRt)
library(UniprotR)
library(ggplot2)
library(ggseqlogo)
library(seqLogo)
## Loading required package: grid
library(grid)
library(dagLogo)
## 
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.2.3
## 
## Attaching package: 'dplyr'
## The following object is masked from 'package:biomaRt':
## 
##     select
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(Biostrings)
## Loading required package: BiocGenerics
## 
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:dplyr':
## 
##     combine, intersect, setdiff, union
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
## 
##     anyDuplicated, append, as.data.frame, basename, cbind, colnames,
##     dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
##     grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
##     order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
##     rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
##     union, unique, unsplit, which.max, which.min
## Loading required package: S4Vectors
## Loading required package: stats4
## 
## Attaching package: 'S4Vectors'
## The following objects are masked from 'package:dplyr':
## 
##     first, rename
## The following objects are masked from 'package:base':
## 
##     expand.grid, I, unname
## Loading required package: IRanges
## 
## Attaching package: 'IRanges'
## The following objects are masked from 'package:dplyr':
## 
##     collapse, desc, slice
## The following object is masked from 'package:grDevices':
## 
##     windows
## Loading required package: XVector
## Loading required package: GenomeInfoDb
## 
## Attaching package: 'Biostrings'
## The following object is masked from 'package:grid':
## 
##     pattern
## The following object is masked from 'package:base':
## 
##     strsplit
library(janitor)
## 
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
## 
##     chisq.test, fisher.test
library(stringr)
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.2.3
## Warning: package 'tibble' was built under R version 4.2.3
## Warning: package 'tidyr' was built under R version 4.2.3
## Warning: package 'readr' was built under R version 4.2.3
## Warning: package 'purrr' was built under R version 4.2.3
## Warning: package 'forcats' was built under R version 4.2.3
## Warning: package 'lubridate' was built under R version 4.2.3
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.0     ✔ readr     2.1.4
## ✔ lubridate 1.9.2     ✔ tibble    3.2.1
## ✔ purrr     1.0.1     ✔ tidyr     1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ lubridate::%within%()    masks IRanges::%within%()
## ✖ Biostrings::collapse()   masks IRanges::collapse(), dplyr::collapse()
## ✖ BiocGenerics::combine()  masks dplyr::combine()
## ✖ purrr::compact()         masks XVector::compact()
## ✖ IRanges::desc()          masks dplyr::desc()
## ✖ tidyr::expand()          masks S4Vectors::expand()
## ✖ dplyr::filter()          masks stats::filter()
## ✖ S4Vectors::first()       masks dplyr::first()
## ✖ dplyr::lag()             masks stats::lag()
## ✖ BiocGenerics::Position() masks ggplot2::Position(), base::Position()
## ✖ purrr::reduce()          masks IRanges::reduce()
## ✖ S4Vectors::rename()      masks dplyr::rename()
## ✖ lubridate::second()      masks S4Vectors::second()
## ✖ lubridate::second<-()    masks S4Vectors::second<-()
## ✖ dplyr::select()          masks biomaRt::select()
## ✖ XVector::slice()         masks IRanges::slice(), dplyr::slice()
## ℹ Use the ]8;;http://conflicted.r-lib.org/conflicted package]8;; to force all conflicts to become errors
library(EnhancedVolcano)
library(basicPlotteR)
# nardimo barvanje po gostoti

plot_colorByDensity = function(x1,x2,
                               ylim=c(min(x2),max(x2)),
                               xlim=c(min(x1),max(x1)),
                               xlab="",ylab="",main="") {
     
    df <- data.frame(x1,x2)
    x <- densCols(x1,x2, colramp=colorRampPalette(c("black", "white")))
    df$dens <- col2rgb(x)[1,] + 1L
    cols <-  colorRampPalette(c("#000099",  "#45FE4F","#FCFF00", "#FF9400", "#FF3100"))(256)
    df$col <- cols[df$dens]
    plot(x2~x1, data=df[order(df$dens),], 
         ylim=ylim,xlim=xlim,pch=20,col=col,
         cex=2,xlab=xlab,ylab=ylab,
         main=main)
}

Kidney ConA 11. 11. 2022

kcprot <- read_excel("Z:/TSever/Misc/glycoproteomics/kidney_cona_proteins.xlsx") # uvozimo podatke za proteine, izvozeno iz perseus tabele

kcpep <- read_excel("Z:/TSever/Misc/glycoproteomics/kidney_cona_peptides.xlsx") # uvozimo podatke za peptide, izvozeno iz perseus tabele

kcprot <- clean_names(kcprot)
kcpep <- clean_names(kcpep)
#poiscemo kateri peptidi imajo konsenzusno zaporedje N[^P][STC]
kcpepg <- kcpep[grep("N[^P][STC]", kcpep$t_sequence),]

#pridobimo sekvence teh proteinov
#tega pol ne ponucamo
accessions_kcpepg <-kcpepg$t_leading_razor_protein
Sequences_Information_kc<-GetSequences(accessions_kcpepg, directorypath = 'L:/')
## Please wait we are processing your accessions ...
#nardimo objekte samo z sekvencami peptidov in samo z sekvencami v istem vrstnem redu
vectorofseq<-Sequences_Information_kc$Sequence
vectorofpep<-kcpepg$t_sequence
# for loop ki napise lokacije vseh peptidov v sekvenci
#zacetek, konec, dolzino peptida in sekvenco peptida
#notr v data.frame df jih da

i=1

df = data.frame()

for (i in 1: length(vectorofpep))   {
  
  toFind<-vectorofpep[i]
  here<-vectorofseq[i]
  
  
 output <- matchPattern(toFind, here)
 output<-as.data.frame(output) 
 
 df=rbind(df,output)
  
  
  i<-i+1
  
}
#poiscemo, kje se prvic pojavi N X S/T/C v sekvenci peptida
my_string <- df$seq #define string
#find position of first occurrence of 'N X S/T/C '
position<-((str_locate(pattern = "N.[STC]", my_string)) -1) +df$start #str_locate poizce zacetek in konec
position <- position[-c((length(position)/2)+1  : length(position)  )] #ker imamo zacetek in konec, pobrisemo konce
#poiscemo aminokislino na mestu position
aa<-substring(vectorofseq, position, position)
#aa<-aa[-c((length(aa)/2)  : length(aa)  )] #ker imamo zacetek in konec, pobrisemo konce
#dodamo pozicije N -jev v kcpepg data.frame
kcpepg["position"]<-c(position)

#zdruzimo stoplca z gene name in position v nov stolpec, kjer je zdruzeno 
kcpepg$gn_position <- paste(kcpepg$t_gene_names, kcpepg$position, sep = "-" )
#dejmo se tole mal leps nardit, pa pokazat sam te ko so signifikantni
lbls2<-filter(kcpepg, (n_log_students_t_test_p_value_wt_ko > 2 & (n_students_t_test_difference_wt_ko > 1 | n_students_t_test_difference_wt_ko < -1)))
## Use densCols() output to get density at each point
dr<-data.frame(kcpep$n_students_t_test_difference_wt_ko, kcpep$n_log_students_t_test_p_value_wt_ko)

x <- densCols(kcpep$n_students_t_test_difference_wt_ko, kcpep$n_log_students_t_test_p_value_wt_ko, colramp=colorRampPalette(c("black", "white")))
dr$dens <- col2rgb(x)[1,] + 1L

## Map densities to colors
cols <-  colorRampPalette(c("#55a0fb","#4CC7B0", "#4cc7b0" ,"#b6e366", "#e5c36e", "#f94040"))(256)
dr$col <- cols[dr$dens]
#tiff("Plotcolor_kidney_ConA2.tif",height = 12, width = 10, units = 'in', res = 2000)

plot(x=kcpep$n_students_t_test_difference_wt_ko, y=kcpep$n_log_students_t_test_p_value_wt_ko, cex=1, xlab=expression(italic(log[2])~Fold~change), ylab=expression(italic(-log[10])~P-value), xlim=c(-8,8), col=dr$col, pch=20)
  abline(v=c(-1,1), h=-log10(0.01))
 addTextLabels(lbls2$n_students_t_test_difference_wt_ko, lbls2$n_log_students_t_test_p_value_wt_ko, lbls2$gn_position, cex.label=0.88, col.label='black', col.background=NULL, avoidPoints=TRUE)
points(kcpepg$n_students_t_test_difference_wt_ko, kcpepg$n_log_students_t_test_p_value_wt_ko, col='#000000', type='p', pch=16, cex=0.9)

#dev.off()
names(kcprot)[names(kcprot)== "t_majority_protein_i_ds"] <- "prot_names" #spremenimo ime stolpcev z accession numberji, da jih lahka zdruzimo po njih
names(kcpepg)[names(kcpepg)== "t_leading_razor_protein"] <- "prot_names"
kcpg<-merge(kcprot, kcpepg, by = "prot_names") #zdruzimo keri so gliko peptidi z njihovimi proteini 
lbls3<-filter(kcpg, (n_log_welchs_t_test_p_value_wt_ko > 2 & (n_welchs_t_test_difference_wt_ko > 1 | n_welchs_t_test_difference_wt_ko < -1)))
## Use densCols() output to get density at each point
dr<-data.frame(kcprot$n_welchs_t_test_difference_wt_ko, kcprot$n_log_welchs_t_test_p_value_wt_ko)

x <- densCols(kcprot$n_welchs_t_test_difference_wt_ko, kcprot$n_log_welchs_t_test_p_value_wt_ko, colramp=colorRampPalette(c("black", "white")))
dr$dens <- col2rgb(x)[1,] + 1L

## Map densities to colors
cols <-  colorRampPalette(c("#55a0fb","#4CC7B0", "#4cc7b0" ,"#b6e366", "#e5c36e", "#f94040"))(256)
dr$col <- cols[dr$dens]
#tiff("Plotcolor_kidney_ConA2.tif",height = 12, width = 10, units = 'in', res = 2000)

plot(x=kcprot$n_welchs_t_test_difference_wt_ko, y=kcprot$n_log_welchs_t_test_p_value_wt_ko, cex=1, xlab=expression(italic(log[2])~Fold~change), ylab=expression(italic(-log[10])~P-value), xlim=c(-8,8), col=dr$col, pch=20)
  abline(v=c(-1,1), h=-log10(0.01))
 addTextLabels(lbls3$n_welchs_t_test_difference_wt_ko, lbls3$n_log_welchs_t_test_p_value_wt_ko, lbls3$gn_position, cex.label=0.88, col.label='black', col.background=NULL, avoidPoints=TRUE)
points(kcpg$n_students_t_test_difference_wt_ko, kcpg$n_log_students_t_test_p_value_wt_ko, col='#000000', type='p', pch=16, cex=0.9)
points(kcpg$n_welchs_t_test_difference_wt_ko, kcpg$n_log_welchs_t_test_p_value_wt_ko, col='#000000', type='p', pch=16, cex=0.9)

#dev.off()

Kidney WGA 14. 6. 2021

kwprot <- read_excel("Z:/TSever/Misc/glycoproteomics/kidney_wga_proteins.xlsx") # uvozimo podatke za proteine, izvozeno iz perseus tabele

kwpep <- read_excel("Z:/TSever/Misc/glycoproteomics/kidney_wga_peptides.xlsx") # uvozimo podatke za peptide, izvozeno iz perseus tabele

kwprot <- clean_names(kwprot)
kwpep <- clean_names(kwpep)
#poiscemo kateri peptidi imajo konsenzusno zaporedje N[^P][STC]
kwpepg <- kwpep[grep("N[^P][STC]", kwpep$t_sequence),]

#pridobimo sekvence teh proteinov
#tega pol ne ponucamo
accessions_kwpepg <-kwpepg$t_leading_razor_protein
Sequences_Information_kw<-GetSequences(accessions_kwpepg, directorypath = 'L:/')
## Please wait we are processing your accessions ...
#nardimo objekte samo z sekvencami peptidov in samo z sekvencami v istem vrstnem redu
vectorofseq<-Sequences_Information_kw$Sequence
vectorofpep<-kwpepg$t_sequence
# for loop ki napise lokacije vseh peptidov v sekvenci
#zacetek, konec, dolzino peptida in sekvenco peptida
#notr v data.frame df jih da

i=1

df = data.frame()

for (i in 1: length(vectorofpep))   {
  
  toFind<-vectorofpep[i]
  here<-vectorofseq[i]
  
  
 output <- matchPattern(toFind, here)
 output<-as.data.frame(output) 
 
 df=rbind(df,output)
  
  
  i<-i+1
  
}
#poiscemo, kje se prvic pojavi N X S/T/C v sekvenci peptida
my_string <- df$seq #define string
#find position of first occurrence of 'N X S/T/C '
position<-((str_locate(pattern = "N.[STC]", my_string)) -1) +df$start #str_locate poizce zacetek in konec
position <- position[-c((length(position)/2)+1  : length(position)  )] #ker imamo zacetek in konec, pobrisemo konce
#poiscemo aminokislino na mestu position
aa<-substring(vectorofseq, position, position)
#aa<-aa[-c((length(aa)/2)  : length(aa)  )] #ker imamo zacetek in konec, pobrisemo konce
#dodamo pozicije N -jev v kcpepg data.frame
kwpepg["position"]<-c(position)

#zdruzimo stoplca z gene name in position v nov stolpec, kjer je zdruzeno 
kwpepg$gn_position <- paste(kwpepg$t_gene_names, kwpepg$position, sep = "-" )
#dejmo se tole mal leps nardit, pa pokazat sam te ko so signifikantni
lbls2<-filter(kwpepg, (n_log_students_t_test_p_value_wt_ko > 2 & (n_students_t_test_difference_wt_ko > 1 | n_students_t_test_difference_wt_ko < -1)))
## Use densCols() output to get density at each point
dr<-data.frame(kwpep$n_students_t_test_difference_wt_ko, kwpep$n_log_students_t_test_p_value_wt_ko)

x <- densCols(kwpep$n_students_t_test_difference_wt_ko, kwpep$n_log_students_t_test_p_value_wt_ko, colramp=colorRampPalette(c("black", "white")))
dr$dens <- col2rgb(x)[1,] + 1L

## Map densities to colors
cols <-  colorRampPalette(c("#55a0fb","#4CC7B0", "#4cc7b0" ,"#b6e366", "#e5c36e", "#f94040"))(256)
dr$col <- cols[dr$dens]
#tiff("Plotcolor_kidney_ConA2.tif",height = 12, width = 10, units = 'in', res = 2000)

plot(x=kwpep$n_students_t_test_difference_wt_ko, y=kwpep$n_log_students_t_test_p_value_wt_ko, cex=1, xlab=expression(italic(log[2])~Fold~change), ylab=expression(italic(-log[10])~P-value), xlim=c(-8,8), col=dr$col, pch=20)
  abline(v=c(-1,1), h=-log10(0.01))
 addTextLabels(lbls2$n_students_t_test_difference_wt_ko, lbls2$n_log_students_t_test_p_value_wt_ko, lbls2$gn_position, cex.label=0.88, col.label='black', col.background=NULL, avoidPoints=TRUE)
points(kwpepg$n_students_t_test_difference_wt_ko, kwpepg$n_log_students_t_test_p_value_wt_ko, col='#000000', type='p', pch=16, cex=0.9)

#dev.off()
names(kwprot)[names(kwprot)== "t_majority_protein_i_ds"] <- "prot_names" #spremenimo ime stolpcev z accession numberji, da jih lahka zdruzimo po njih
names(kwpepg)[names(kwpepg)== "t_leading_razor_protein"] <- "prot_names"
kwpg<-merge(kwprot, kwpepg, by = "prot_names") #zdruzimo keri so gliko peptidi z njihovimi proteini 
lbls3<-filter(kwpg, (n_log_students_t_test_p_value_wt_ko.x > 2 & (n_students_t_test_difference_wt_ko.x > 1 | n_students_t_test_difference_wt_ko.x < -1)))
## Use densCols() output to get density at each point
dr<-data.frame(kwprot$n_students_t_test_difference_wt_ko, kwprot$n_log_students_t_test_p_value_wt_ko)

x <- densCols(kwprot$n_students_t_test_difference_wt_ko, kwprot$n_log_students_t_test_p_value_wt_ko, colramp=colorRampPalette(c("black", "white")))
dr$dens <- col2rgb(x)[1,] + 1L

## Map densities to colors
cols <-  colorRampPalette(c("#55a0fb","#4CC7B0", "#4cc7b0" ,"#b6e366", "#e5c36e", "#f94040"))(256)
dr$col <- cols[dr$dens]
#tiff("Plotcolor_kidney_ConA2.tif",height = 12, width = 10, units = 'in', res = 2000)

plot(x=kwprot$n_students_t_test_difference_wt_ko, y=kwprot$n_log_students_t_test_p_value_wt_ko, cex=1, xlab=expression(italic(log[2])~Fold~change), ylab=expression(italic(-log[10])~P-value), xlim=c(-8,8), col=dr$col, pch=20)
  abline(v=c(-1,1), h=-log10(0.01))
 addTextLabels(lbls3$n_students_t_test_difference_wt_ko.x, lbls3$n_log_students_t_test_p_value_wt_ko.x, lbls3$gn_position, cex.label=0.88, col.label='black', col.background=NULL, avoidPoints=TRUE)
points(kwpg$n_students_t_test_difference_wt_ko.x, kwpg$n_log_students_t_test_p_value_wt_ko.x, col='#000000', type='p', pch=16, cex=0.9)

#dev.off()

Kidney ConA + WGA

((KO/WT)WGA/(KO/WT)ConA)e-1

#poiscemo kateri proteini so isti pri ConA in WGA
kcwt_mean <- rowMeans(kcprot[,1:3]) #povprecje wt od kidney conA 
kcko_mean <- rowMeans(kcprot[,4:6])

kwwt_mean <- rowMeans(kwprot[,1:3])
kwko_mean <- rowMeans(kwprot[,4:6])

kw_ratio <-as.data.frame(kwko_mean/kwwt_mean) #zracunamo razmerje ko / wt za ((KO/WT)WGA/(KO/WT)ConA)e-1
kc_ratio <- as.data.frame(kcko_mean/kcwt_mean)

kw_ratio <-cbind(kw_ratio, prot_names = kwprot$prot_names) # dodamo accesion numberje
kw_ratio <-cbind(kw_ratio, gene_names = kwprot$t_gene_names)# dodamo accesion numberje
kc_ratio <-cbind(kc_ratio, prot_names = kcprot$prot_names)
kc_ratio <-cbind(kc_ratio, gene_names = kcprot$t_gene_names)

kwkc_ratio <- merge(kw_ratio, kc_ratio, by = "prot_names") # zdruzimo tabeli z razmerji, da dobimo, kateri so isti proteini v ConA in WGA #jih je 143 skupnih
k_ratio <- kwkc_ratio[,2]/kwkc_ratio[,4]

kwkc_ratio <- cbind(kwkc_ratio, ratio = k_ratio)

kwkc_ratio[order(kwkc_ratio$ratio),]
##        prot_names kwko_mean/kwwt_mean    gene_names.x kcko_mean/kcwt_mean
## 17         P07724           0.9879545             Alb           1.2550516
## 76         Q3TCN2           0.9553904           Plbd2           1.1576327
## 136        Q9QWR8           1.0247777            Naga           1.2395989
## 96         Q80X19           1.0344967         Col14a1           1.2329237
## 82         Q60866           1.0039729            Pter           1.1400904
## 9          O88338           1.0062677           Cdh16           1.1366099
## 4          O08677           0.9727639            Kng1           1.0905051
## 10         O89017           0.7849635            Lgmn           0.8760891
## 7          O35295           1.0538098            Purb           1.1631792
## 1          A2ARV4           0.9965171            Lrp2           1.0977707
## 38         P20152           1.0173560             Vim           1.1138367
## 120        Q99LB7           0.9640948           Sardh           1.0552008
## 108        Q8R146           0.9958301            Apeh           1.0795551
## 115        Q91X72           0.9896533             Hpx           1.0694848
## 25         P13020           0.9928666             Gsn           1.0705698
## 105        Q8K0L3           0.9559687           Acsm2           1.0286056
## 69         Q00897           0.8490337       Serpina1d           0.9128690
## 41         P23953           0.9892532           Ces1c           1.0615658
## 125        Q9DBX3           0.9996846           Susd2           1.0716075
## 57         P51855           0.9838664             Gss           1.0545982
## 18         P07759           0.9692034       Serpina3k           1.0364934
## 92         Q6P5E4           0.9981430           Uggt1           1.0645184
## 39         P21614           0.9725143              Gc           1.0362754
## 94         Q78PY7           0.9445096            Snd1           1.0060781
## 90         Q62468           0.9781518            Vil1           1.0363452
## 14  P06281;P00796           0.9709177       Ren1;Ren2           1.0275636
## 122        Q9D051           0.9942156            Pdhb           1.0402195
## 130        Q9JIL4           0.9927476           Pdzk1           1.0368438
## 50         P29699           0.9645175            Ahsg           1.0051071
## 84         Q61147           0.9887061              Cp           1.0300435
## 54         P42669           1.0330132            Pura           1.0727478
## 47         P28825           0.9899860           Mep1a           1.0275969
## 128        Q9ET22           1.0167715            Dpp7           1.0512239
## 72         Q02053           1.0008372            Uba1           1.0334624
## 24         P11438           1.0195232           Lamp1           1.0516343
## 22         P10518           0.9984498            Alad           1.0285769
## 35         P19221           0.9578069              F2           0.9866030
## 6          O09159           1.0264222          Man2b1           1.0563053
## 111        Q8VCM7           0.9532918             Fgg           0.9799219
## 23         P10605           1.0040996            Ctsb           1.0313348
## 139        Q9WV92           0.9981262         Epb41l3           1.0222345
## 86         Q61702           0.9755605           Itih1           0.9965040
## 142        Q9Z0L8           1.3455019             Ggh           1.3729419
## 11         P01027           1.0165668              C3           1.0369860
## 106        Q8K2I4           1.0636696           Manba           1.0836513
## 129        Q9JHI5           0.9787855             Ivd           0.9971660
## 93         Q6ZQM8           0.9678428         Ugt1a7c           0.9857858
## 87         Q61703           0.9727369           Itih2           0.9899456
## 40         P23780           1.0561425            Glb1           1.0737701
## 52         P35486           0.9816811           Pdha1           0.9968941
## 112        Q8VDN2           1.0077316          Atp1a1           1.0228374
## 49         P29341           1.0482064          Pabpc1           1.0610897
## 97         Q80X90           1.0004789            Flnb           1.0117489
## 43         P26040           0.9892980             Ezr           0.9983557
## 85         Q61316           0.9972769           Hspa4           1.0029733
## 134        Q9JLB4           0.9988731            Cubn           1.0032368
## 101        Q8BJ64           1.0269744            Chdh           1.0278354
## 80         Q60597           0.9726489            Ogdh           0.9723290
## 29         P16406           1.0135383           Enpep           1.0126479
## 46         P28665           0.9579499            Mug1           0.9568437
## 140        Q9WVE8           1.0111681         Pacsin2           1.0086526
## 127        Q9ESB3           0.9554982             Hrg           0.9525474
## 116        Q91Y97           1.0013079           Aldob           0.9972383
## 28         P14211           1.0041994            Calr           0.9970556
## 37         P20060           1.0528283            Hexb           1.0435131
## 21  P10126;P62631           0.9914697   Eef1a1;Eef1a2           0.9823132
## 79         Q571E4           1.0048377           Galns           0.9953161
## 117        Q921I1           0.9869232              Tf           0.9771355
## 138        Q9WUU7           1.0449564            Ctsz           1.0333157
## 118        Q922R8           1.0014367           Pdia6           0.9896557
## 71         Q01279           0.9151521            Egfr           0.9042253
## 5          O08795           0.9917041          Prkcsh           0.9790994
## 33         P17047           1.0210657           Lamp2           1.0067325
## 143 Q9Z0N1;Q9Z0N2           0.9924551 Eif2s3x;Eif2s3y           0.9773706
## 73         Q03265           1.0080814          Atp5a1           0.9926229
## 67         P70441           1.0009905        Slc9a3r1           0.9817669
## 59         P51885           1.0217320             Lum           0.9997883
## 88         Q61838           0.9667710             A2m           0.9455529
## 141        Q9WVJ3           1.0148117             Cpq           0.9914167
## 12         P01029           0.9888494             C4b           0.9641355
## 104        Q8K0E8           0.9536515             Fgb           0.9293103
## 30         P16546           0.9906025          Sptan1           0.9651990
## 53         P35822           0.9757327           Ptprk           0.9485469
## 99         Q8BG07           1.1778260            Pld4           1.1447474
## 131        Q9JK53           1.0414649           Prelp           1.0084025
## 77         Q3U1J4           0.9995106            Ddb1           0.9669908
## 63         P58771           1.0083087            Tpm1           0.9754008
## 135        Q9QUM9           0.9921640           Psma6           0.9587254
## 126        Q9ES64           0.9908074           Ush1c           0.9568684
## 48         P28843           1.0100601            Dpp4           0.9727532
## 44         P26043           0.9584794             Rdx           0.9204213
## 26         P14094           1.0126132          Atp1b1           0.9717633
## 114        Q91X17           0.9952419            Umod           0.9543531
## 64         P63017           0.9957007           Hspa8           0.9496610
## 8          O70194           0.9975325           Eif3d           0.9510636
## 55         P50396           0.9948959            Gdi1           0.9462723
## 110        Q8VCI0           1.0725824           Plbd1           1.0156793
## 75         Q07456           0.9919188            Ambp           0.9388655
## 78         Q3ULD5           0.9816379           Mccc2           0.9273254
## 51         P32261           1.0120990        Serpinc1           0.9549416
## 60         P55302           0.9928389          Lrpap1           0.9363159
## 16         P06909           0.9914772             Cfh           0.9346397
## 61         P56480           0.9948366           Atp5b           0.9370248
## 102        Q8BSY0           1.0123216            Asph           0.9525013
## 15         P06683           0.9636498              C9           0.9037837
## 3          E9PV24           0.9634282             Fga           0.9024979
## 56         P50429           1.0149988            Arsb           0.9499063
## 137        Q9QXC1           0.9809546           Fetub           0.9174116
## 100        Q8BHN3           0.9924674           Ganab           0.9253881
## 133        Q9JL35           1.0323918           Hmgn5           0.9619524
## 107        Q8R086           0.9915330            Suox           0.9229719
## 91         Q6IRU2           1.0034869            Tpm4           0.9306871
## 132        Q9JKR6           1.0072260           Hyou1           0.9330855
## 109        Q8VC60           0.9788148           Glb1l           0.9046955
## 65         P63038           0.9959852           Hspd1           0.9184928
## 19         P08003           1.0049371           Pdia4           0.9252604
## 58         P51859           1.0114232            Hdgf           0.9309838
## 13         P01872           0.9654392            Ighm           0.8863319
## 20         P09103           0.9945847            P4hb           0.9105929
## 62         P57780           0.9952418           Actn4           0.9086966
## 42         P24270           0.9221474             Cat           0.8416837
## 81         Q60865           1.0341926         Caprin1           0.9436914
## 45         P27773           1.0020511           Pdia3           0.9119905
## 32         P16858           1.0088592           Gapdh           0.9148319
## 95         Q7TPR4           1.0031255           Actn1           0.9090974
## 113        Q91V76           0.9759533            <NA>           0.8839435
## 2          A6X935           1.1043762           Itih4           0.9997340
## 121        Q99MN9           0.9868384            Pccb           0.8930092
## 89         Q61847           0.9875850           Mep1b           0.8876292
## 36         P20029           1.0000141           Hspa5           0.8986691
## 124        Q9D2G2           1.0001155            Dlst           0.8954093
## 83         Q60928           1.0009879            Ggt1           0.8826287
## 68         P97449           1.0125880           Anpep           0.8897291
## 123        Q9D0G0           0.9959531          Mrps30           0.8742825
## 74         Q03734           0.9221660       Serpina3m           0.8095063
## 119        Q99L47           1.0016682            St13           0.8777669
## 27         P14206           1.0112615            Rpsa           0.8741934
## 66         P70158           1.0206071         Smpdl3a           0.8821818
## 31         P16675           0.9974871            Ctsa           0.8475441
## 103        Q8BTM8           1.0225643            Flna           0.8636848
## 98         Q8BFR4           1.0501233             Gns           0.8703726
## 34         P18242           1.0384339            Ctsd           0.8510612
## 70         Q00898           0.8997457       Serpina1e           0.7180666
##        gene_names.y     ratio
## 17              Alb 0.7871823
## 76            Plbd2 0.8252967
## 136            Naga 0.8267010
## 96          Col14a1 0.8390598
## 82             Pter 0.8806082
## 9             Cdh16 0.8853237
## 4              Kng1 0.8920306
## 10             Lgmn 0.8959859
## 7              Purb 0.9059737
## 1              Lrp2 0.9077644
## 38              Vim 0.9133798
## 120           Sardh 0.9136600
## 108            Apeh 0.9224449
## 115             Hpx 0.9253552
## 25              Gsn 0.9274189
## 105           Acsm2 0.9293831
## 69        Serpina1d 0.9300718
## 41            Ces1c 0.9318812
## 125           Susd2 0.9328832
## 57              Gss 0.9329301
## 18        Serpina3k 0.9350791
## 92            Uggt1 0.9376475
## 39               Gc 0.9384709
## 94             Snd1 0.9388035
## 90             Vil1 0.9438474
## 14        Ren1;Ren2 0.9448736
## 122            Pdhb 0.9557747
## 130           Pdzk1 0.9574707
## 50             Ahsg 0.9596167
## 84               Cp 0.9598683
## 54             Pura 0.9629600
## 47            Mep1a 0.9633992
## 128            Dpp7 0.9672264
## 72             Uba1 0.9684311
## 24            Lamp1 0.9694655
## 22             Alad 0.9707098
## 35               F2 0.9708129
## 6            Man2b1 0.9717097
## 111             Fgg 0.9728242
## 23             Ctsb 0.9735923
## 139         Epb41l3 0.9764161
## 86            Itih1 0.9789831
## 142             Ggh 0.9800137
## 11               C3 0.9803091
## 106           Manba 0.9815607
## 129             Ivd 0.9815672
## 93          Ugt1a7c 0.9817983
## 87            Itih2 0.9826166
## 40             Glb1 0.9835835
## 52            Pdha1 0.9847396
## 112          Atp1a1 0.9852315
## 49           Pabpc1 0.9878584
## 97             Flnb 0.9888609
## 43              Ezr 0.9909274
## 85            Hspa4 0.9943205
## 134            Cubn 0.9956504
## 101            Chdh 0.9991623
## 80             Ogdh 1.0003290
## 29            Enpep 1.0008793
## 46             Mug1 1.0011561
## 140         Pacsin2 1.0024939
## 127             Hrg 1.0030978
## 116           Aldob 1.0040809
## 28             Calr 1.0071649
## 37             Hexb 1.0089267
## 21    Eef1a1;Eef1a2 1.0093213
## 79            Galns 1.0095664
## 117              Tf 1.0100167
## 138            Ctsz 1.0112654
## 118           Pdia6 1.0119042
## 71             Egfr 1.0120842
## 5            Prkcsh 1.0128738
## 33            Lamp2 1.0142374
## 143 Eif2s3x;Eif2s3y 1.0154337
## 73           Atp5a1 1.0155734
## 67         Slc9a3r1 1.0195806
## 59              Lum 1.0219483
## 88              A2m 1.0224398
## 141             Cpq 1.0235976
## 12              C4b 1.0256332
## 104             Fgb 1.0261927
## 30           Sptan1 1.0263195
## 53            Ptprk 1.0286605
## 99             Pld4 1.0288959
## 131           Prelp 1.0327869
## 77             Ddb1 1.0336299
## 63             Tpm1 1.0337378
## 135           Psma6 1.0348782
## 126           Ush1c 1.0354688
## 48             Dpp4 1.0383519
## 44              Rdx 1.0413486
## 26           Atp1b1 1.0420369
## 114            Umod 1.0428445
## 64            Hspa8 1.0484802
## 8             Eif3d 1.0488599
## 55             Gdi1 1.0513844
## 110           Plbd1 1.0560247
## 75             Ambp 1.0565080
## 78            Mccc2 1.0585690
## 51         Serpinc1 1.0598543
## 60           Lrpap1 1.0603674
## 16              Cfh 1.0608123
## 61            Atp5b 1.0616972
## 102            Asph 1.0628033
## 15               C9 1.0662395
## 3               Fga 1.0675130
## 56             Arsb 1.0685252
## 137           Fetub 1.0692633
## 100           Ganab 1.0724877
## 133           Hmgn5 1.0732254
## 107            Suox 1.0742830
## 91             Tpm4 1.0782215
## 132           Hyou1 1.0794574
## 109           Glb1l 1.0819273
## 65            Hspd1 1.0843691
## 19            Pdia4 1.0861127
## 58             Hdgf 1.0864026
## 13             Ighm 1.0892525
## 20             P4hb 1.0922386
## 62            Actn4 1.0952410
## 42              Cat 1.0955985
## 81          Caprin1 1.0959013
## 45            Pdia3 1.0987517
## 32            Gapdh 1.1027809
## 95            Actn1 1.1034302
## 113            <NA> 1.1040901
## 2             Itih4 1.1046701
## 121            Pccb 1.1050709
## 89            Mep1b 1.1126099
## 36            Hspa5 1.1127723
## 124            Dlst 1.1169367
## 83             Ggt1 1.1340985
## 68            Anpep 1.1380858
## 123          Mrps30 1.1391662
## 74        Serpina3m 1.1391709
## 119            St13 1.1411550
## 27             Rpsa 1.1567937
## 66          Smpdl3a 1.1569125
## 31             Ctsa 1.1769147
## 103            Flna 1.1839554
## 98              Gns 1.2065216
## 34             Ctsd 1.2201636
## 70        Serpina1e 1.2530115

chickens[order(chickens$feathers),]