2019.10.1
添加環(huán)境變量:
永久式:1.echo $PATH
2. vim ~/.bashrc # .bashrc 文件是個人用戶目錄下的環(huán)境變量文件,進入后在文件最后加入一行 (以安裝stringtie為例,stringtie-2下有stringtie的可執(zhí)行文件,只需要把目錄給環(huán)境變量,其會在這個目錄里找stringtie這個可執(zhí)行木目錄)

3. source ~/.bashrc #source 命令使該文件立即生效;如果不source,需要在下次進入時bash會遍歷環(huán)境變量文件.bashrc 或.bash_profile 等

/source后不出錯則添加環(huán)境變量成功。也可再次echo $PATH 查看環(huán)境變量,會發(fā)現(xiàn)新加了的PATH。

2019.10.4
安裝R以及RStudio,安裝package時,方法一:> source("https://bioconductor.org/biocLite.R") #給一個可下載包的網(wǎng)址
> biocLite("ballgown") #雙引號內(nèi)為需要添加的包
R <- 和 = 都是賦值符號,但作用域不一樣,前者為local 后者為全局;
使用getwd()函數(shù)來檢查R工作區(qū)指向哪個目錄,使用setwd()函數(shù)設(shè)置新的工作目錄。
`2019.10.6
運行Rstudio

如下圖

設(shè)定工作路徑和讀入表型文件:

把表型文件賦給pheno_data ,然后Load ballgown data structures for each sample,但是這步出錯了,用traceback函數(shù)查看運行過程,如下圖:

解決辦法:把pheno.csv文件里的id改成和ballgown文件夾里一致,如下:


再次運行命令:bg_1 = ballgown(dataDir = "D:/biosoft/data/ballgown", samplePattern = "", pData=pheno_data)

BWT/FM index 算法詳解鏈接:https://www.bilibili.com/video/av15743137?from=search&seid=14104311822831351060
2019.10.12
運行 ./sh 文件時出現(xiàn)報錯:-bash: xxx: /bin/sh^M: bad interpreter: No such file or directory 或者 : No such file or directory 時,
1,查看文件權(quán)限 chmod +x 文件
2,查看文件格式 set ff =unix (vim終端下)
2019.10.13
在用stringtie拼轉(zhuǎn)錄組時出現(xiàn)問題:
命令行: stringtie -p 16 -G ./new/T_thermophila_June2014.gff3 -o {i} ${i}_rmdup.bam
問題:WARNING: no reference transcripts were found for the genomic sequences where reads were mapped!
Please make sure the -G annotation file uses the same naming convention for the genome sequences.
注釋文件 : T_thermophila_June2014.gff3 基因組序列文件:T_thermophila_June2014_gene.fasta


解決辦法:注釋文件gff3里需要改XXX??,使用使用處理后的版本 T_thermophila_June2014_gene_name.gff3
2019.10.19
問題:featureCounts 之后報錯
1. ERROR: no features were loaded in format GTF. The annotation format can be specified by the '-F' option, and the required feature type can be specified by the '-t' option..
原因:使用單獨的轉(zhuǎn)錄本會有很多部分對不上。
解決辦法:注釋文件使用stringtie --merge之后的合并轉(zhuǎn)錄本
2. ERROR: failed to find the gene identifier attribute in the 9th column of the provided GTF file.The specified gene identifier attribute is 'gene_name' The attributes included in your GTF annotation are 'gene_id', 'transcript_id "rna...";'
原因:用gene_name處理過的gff3文件,gene_name對應(yīng)著TTHERM號,但是并不是每一行的reads都有TTHERM號,所以報錯。
解決方法:grep -f 'TTHERM' xxx_merge.gtf > xxx_merge_grep.gtf