切换到shard下,输入
mixcr analyze amplicon --species hs --starting-material dna --5-end v-primers --3-end j-primers --adapters adapters-present QOE1912005-DNA_Adapter_96_02_FKDL192546085-1a-A2_1.fq QOE1912005-DNA_Adapter_96_02_FKDL192546085-1a-A2_2.fq analysis
因为在本地(windows)上太慢了,尝试用linux运行一下。
大概是windows跑了20多分钟开始跑linux的。
输入su ,然后输入密码,转换为root角色
apt-get install gedit
gedit /etc/default/grub
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
.fq.gz也可以跑,无需解压。
遇到新报错:
export JAVA_OPTS="-Xms500m -Xmx1024m -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128m -Djava.awt.headless=true "
因为用原始数据跑的,一共12对样本,分为前6对一组和后6对一组,每组TRA、TRB分开出弦图。所以需要把6个TRA/B的txt用代码拼接起来。此处用R,已经分类到文件夹了,所以本来可以全部放到一个文件夹的,为了省空间就费点代码了...
setwd("D:\\mixcr-3.0.13\\弦图\\1")
A1.TRA<-read.table("A1.TRA.txt",header = TRUE, sep = "\t")
A1.TRB<-read.table("A1.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\2")
A2.TRA<-read.table("A2.TRA.txt",header = TRUE, sep = "\t")
A2.TRB<-read.table("A2.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\3")
A3.TRA<-read.table("A3.TRA.txt",header = TRUE, sep = "\t")
A3.TRB<-read.table("A3.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\4")
A4.TRA<-read.table("A4.TRA.txt",header = TRUE, sep = "\t")
A4.TRB<-read.table("A4.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\5")
A5.TRA<-read.table("A5.TRA.txt",header = TRUE, sep = "\t")
A5.TRB<-read.table("A5.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\6")
A6.TRA<-read.table("A6.TRA.txt",header = TRUE, sep = "\t")
A6.TRB<-read.table("A6.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\7")
A7.TRA<-read.table("A7.TRA.txt",header = TRUE, sep = "\t")
A7.TRB<-read.table("A7.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\8")
A8.TRA<-read.table("A8.TRA.txt",header = TRUE, sep = "\t")
A8.TRB<-read.table("A8.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\9")
A9.TRA<-read.table("A9.TRA.txt",header = TRUE, sep = "\t")
A9.TRB<-read.table("A9.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\10")
A10.TRA<-read.table("A10.TRA.txt",header = TRUE, sep = "\t")
A10.TRB<-read.table("A10.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\11")
A11.TRA<-read.table("A11.TRA.txt",header = TRUE, sep = "\t")
A11.TRB<-read.table("A11.TRB.txt",header = TRUE, sep = "\t")
setwd("D:\\mixcr-3.0.13\\弦图\\12")
A12.TRA<-read.table("A12.TRA.txt",header = TRUE, sep = "\t")
A12.TRB<-read.table("A12.TRB.txt",header = TRUE, sep = "\t")
library(tidyverse)
N.TRA<-bind_rows(A1.TRA,A2.TRA,A3.TRA,A4.TRA,A5.TRA,A6.TRA)
N.TRB<-bind_rows(A1.TRB,A2.TRB,A3.TRB,A4.TRB,A5.TRB,A6.TRB)
T.TRA<-bind_rows(A7.TRA,A8.TRA,A9.TRA,A10.TRA,A11.TRA,A12.TRA)
T.TRB<-bind_rows(A7.TRB,A8.TRB,A9.TRB,A10.TRB,A11.TRB,A12.TRB)
setwd("D:\\mixcr-3.0.13\\弦图\\拼接")
write.table (N.TRA, file ="N.TRA.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
write.table (N.TRB, file ="N.TRB.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
write.table (T.TRA, file ="T.TRA.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
write.table (T.TRB, file ="T.TRB.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
真是一段形式优美的代码哈哈,更优美的是都没有报错哈哈:)
java -jar ./vdjtools-1.2.1.jar Convert -S MiXcr N.TRA.txt N.TRB.txt T.TRA.txt T.TRB.txt output_prefix
报错解决:
1:
对比之前的txt发现有所不同
因为之前
write.table (T.TRB, file ="T.TRB.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
里面row.names =TRUE
2:识别不了NA
文件里有很多NA:
对比以前的数据这部分是空白:
本来想用xls的替换功能,老师说“在转格式前,先别想着拼接的事情。因为mixcr格式内容太杂,你上来合并,不晓得会发生什么事情。vdjtools格式简单许多,后面操作你都会心中有数。”
所以我先把A1-12转换格式,再拼接。
打开A1本来想把里面的NA替换成空白的,发现本来就是空白,所以应该是用R拼接的时候弄出的NA。
老师认为:
“多个样品的信息画在一幅图上,恐怕要先看高分文章找找灵感。不可能是直接把所有样品的表格直接合并。不然生物学问题讲不明白。直接合并,并不一定能代表所有样品的平均情况。本身样品间试验情况不尽相同。有些克隆可能情况稳定,另一些还不一定。
得到师姐的回复如下:
只需要证明T组多样性比N组多,所以T组的圈图应该有很多线。
打算先按之前的计划进行,后续若不行再调整。
java -jar ./vdjtools-1.2.1.jar Convert -S MiXcr A1.TRA.txt A1.TRB.txt Convert
转换后开始拼接:
setwd("C:\\Users\\Administrator.DESKTOP-4UQ3Q0K\\Downloads\\vdjtools-1.2.1\\vdjtools-1.2.1")
Convert.A1.TRA<-read.table("Convert.A1.TRA.txt",header = TRUE, sep = "\t")
Convert.A1.TRB<-read.table("Convert.A1.TRB.txt",header = TRUE, sep = "\t")
Convert.A2.TRA<-read.table("Convert.A2.TRA.txt",header = TRUE, sep = "\t")
Convert.A2.TRB<-read.table("Convert.A2.TRB.txt",header = TRUE, sep = "\t")
Convert.A3.TRA<-read.table("Convert.A3.TRA.txt",header = TRUE, sep = "\t")
Convert.A3.TRB<-read.table("Convert.A3.TRB.txt",header = TRUE, sep = "\t")
Convert.A4.TRA<-read.table("Convert.A4.TRA.txt",header = TRUE, sep = "\t")
Convert.A4.TRB<-read.table("Convert.A4.TRB.txt",header = TRUE, sep = "\t")
Convert.A5.TRA<-read.table("Convert.A5.TRA.txt",header = TRUE, sep = "\t")
Convert.A5.TRB<-read.table("Convert.A5.TRB.txt",header = TRUE, sep = "\t")
Convert.A6.TRA<-read.table("Convert.A6.TRA.txt",header = TRUE, sep = "\t")
Convert.A6.TRB<-read.table("Convert.A6.TRB.txt",header = TRUE, sep = "\t")
Convert.A7.TRA<-read.table("Convert.A7.TRA.txt",header = TRUE, sep = "\t")
Convert.A7.TRB<-read.table("Convert.A7.TRB.txt",header = TRUE, sep = "\t")
Convert.A8.TRA<-read.table("Convert.A8.TRA.txt",header = TRUE, sep = "\t")
Convert.A8.TRB<-read.table("Convert.A8.TRB.txt",header = TRUE, sep = "\t")
Convert.A9.TRA<-read.table("Convert.A9.TRA.txt",header = TRUE, sep = "\t")
Convert.A9.TRB<-read.table("Convert.A9.TRB.txt",header = TRUE, sep = "\t")
Convert.A10.TRA<-read.table("Convert.A10.TRA.txt",header = TRUE, sep = "\t")
Convert.A10.TRB<-read.table("Convert.A10.TRB.txt",header = TRUE, sep = "\t")
Convert.A11.TRA<-read.table("Convert.A11.TRA.txt",header = TRUE, sep = "\t")
Convert.A11.TRB<-read.table("Convert.A11.TRB.txt",header = TRUE, sep = "\t")
Convert.A12.TRA<-read.table("Convert.A12.TRA.txt",header = TRUE, sep = "\t")
Convert.A12.TRB<-read.table("Convert.A12.TRB.txt",header = TRUE, sep = "\t")
N.TRA<-bind_rows(Convert.A1.TRA,Convert.A2.TRA,Convert.A3.TRA,Convert.A4.TRA,Convert.A5.TRA,Convert.A6.TRA)
N.TRB<-bind_rows(Convert.A1.TRB,Convert.A2.TRB,Convert.A3.TRB,Convert.A4.TRB,Convert.A5.TRB,Convert.A6.TRB)
T.TRA<-bind_rows(Convert.A7.TRA,Convert.A8.TRA,Convert.A9.TRA,Convert.A10.TRA,Convert.A11.TRA,Convert.A12.TRA)
T.TRB<-bind_rows(Convert.A7.TRB,Convert.A8.TRB,Convert.A9.TRB,Convert.A10.TRB,Convert.A11.TRB,Convert.A12.TRB)
write.table (N.TRA, file ="N.TRA.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
write.table (N.TRB, file ="N.TRB.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
write.table (T.TRA, file ="T.TRA.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
write.table (T.TRB, file ="T.TRB.txt", sep ="\t", row.names =FALSE, col.names =TRUE, quote =FALSE)
java -jar ./vdjtools-1.2.1.jar PlotFancyVJUsage N.TRA.txt N.TRA
参考2021-12-30写的“解决VDJtools中PlotFancyVJUsage绘图失败问题”,完成接下来的步骤。
网友评论