Basic for Linux
First thing is to learn how to enter the server: ssh space name@ip direction,and enter the keyword.
knitr::include_graphics("entry.jpg")
Enter Linux
pwd Print Work Directory:showing the direction of current path
knitr::include_graphics("pwd.jpg")
Enter Linux
mkdir Making Directory:creating a catalog
knitr::include_graphics("pwd.jpg")
Enter Linux
ls check how many documents or catalogs
knitr::include_graphics("ls.jpg")
Enter Linux
rm cd rm : to remove documents rmdir : to remove catalogs rm-r : to remove unempty catalog cd space name of catalog : enter this catalog
knitr::include_graphics("5.jpg")
knitr::include_graphics("6.jpg")
miniconda instal
knitr::include_graphics("install.jpg")
using this command to set up “bash Miniconda3-latest-Linux-x86_64.sh”
knitr::include_graphics("set_up.jpg")
to active: source ~/.bashrc
knitr::include_graphics("active.jpg")
if something wrong here: try
rm ~/.condarc conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/ conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/ conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free/ conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/ conda config –set show_channel_urls yes
installing the package: conda install fastqc -y
knitr::include_graphics("ipackage.jpg")
removing the package: conda remove fastqc -y
knitr::include_graphics("rmpackage.jpg")
could use : packagename space –help to check wether download or not
knitr::include_graphics("fastqccheck.jpg")
check the environment
knitr::include_graphics("envs.jpg")
enter new environment conda activate rna-seq
knitr::include_graphics("activerna.jpg")
boxplot(iris$Sepal.Length~iris$Species,col = c("lightblue","lightyellow","lightpink"))
#a <- read.table(file = "huahua.txt")
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
test <- iris[c(1:2,51:52,101:102),]
mutate(test, new = Sepal.Length * Sepal.Width)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species new
## 1 5.1 3.5 1.4 0.2 setosa 17.85
## 2 4.9 3.0 1.4 0.2 setosa 14.70
## 51 7.0 3.2 4.7 1.4 versicolor 22.40
## 52 6.4 3.2 4.5 1.5 versicolor 20.48
## 101 6.3 3.3 6.0 2.5 virginica 20.79
## 102 5.8 2.7 5.1 1.9 virginica 15.66
select(test,1)
## Sepal.Length
## 1 5.1
## 2 4.9
## 51 7.0
## 52 6.4
## 101 6.3
## 102 5.8
select(test, Petal.Length, Petal.Width)
## Petal.Length Petal.Width
## 1 1.4 0.2
## 2 1.4 0.2
## 51 4.7 1.4
## 52 4.5 1.5
## 101 6.0 2.5
## 102 5.1 1.9
filter(test, Species == "setosa")
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 5.1 3.5 1.4 0.2 setosa
## 2 4.9 3.0 1.4 0.2 setosa
arrange(test, Sepal.Length)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 4.9 3.0 1.4 0.2 setosa
## 2 5.1 3.5 1.4 0.2 setosa
## 3 5.8 2.7 5.1 1.9 virginica
## 4 6.3 3.3 6.0 2.5 virginica
## 5 6.4 3.2 4.5 1.5 versicolor
## 6 7.0 3.2 4.7 1.4 versicolor
summarise(test, mean(Sepal.Length), sd(Sepal.Length))
## mean(Sepal.Length) sd(Sepal.Length)
## 1 5.916667 0.8084965
test %>%
group_by(Species) %>%
summarise(mean(Sepal.Length), sd(Sepal.Length))
## # A tibble: 3 x 3
## Species `mean(Sepal.Length)` `sd(Sepal.Length)`
## <fct> <dbl> <dbl>
## 1 setosa 5 0.141
## 2 versicolor 6.7 0.424
## 3 virginica 6.05 0.354
knitr::include_graphics("sequencing.jpg")