RNA_seq表达分析
来源:互联网 发布:php ip判断地区 编辑:程序博客网 时间:2024/05/23 19:17
输入文件
input_v1.0.txt (三列,分别是 *.1.fastq.gz,*2.fastq.gz , *.sam)
hisat2运行参数与流程(hisat2_IWGSCv1.0.py)
#!/usr/bin/env python# -*- coding: utf-8 -*-__author__ = 'shengwei ma'__author_email__ = 'shengweima@icloud.com'import subprocesswith open('input_v1.0_1.txt', 'r') as f: for line in f: lin = line.strip().split() fq1, fq2, sam = lin[0], lin[1], lin[2] proc = subprocess.Popen( ['hisat2', '-p', '20', '--dta', '-x', '/data2/Fshare/IWGSCv1.0_hisat2/IWGSCv1.0_hiast2', '--known-splicesite-infile', '/data2/Fshare/IWGSCv1.0_hisat2/TGACv1.ss', '--novel-splicesite-infile', '/data2/masw_data/rna_seq/all.ss', '-t', '--no-discordant', '--no-mixed', '-1', fq1, '-2', fq2, '-S', sam], shell=False) proc.wait() print sam new = sam[:-3] + 'unmap.txt' mat = sam[:-3] + 'match.sam' mis = sam[:-3] + 'mismatch.sam' unmap = open(new, 'w') mat1 = open(mat, 'w') mis1 = open(mis, 'w') with open(sam, 'r') as f1: for (num, value) in enumerate(f1): lin = value.strip().split() if value.startswith('@'): mat1.writelines(value) mis1.writelines(value) else: if '*' in lin[2]: unmap.writelines(lin[0]) else: if 'I' not in lin[5] and 'D' not in lin[5] and 'XM:i:0' in value: #筛选完全匹配的reads,但是对于softclip 无效 mat1.writelines(value) if 'I' not in lin[5] and 'D' not in lin[5] and 'XM:i:0' not in value: mis1.writelines(value) mat1.close() unmap.close() mis1.close() proc = subprocess.Popen(['samtools', 'view', '-@', '10', '-b', '-o', mat[:-3] + 'bam', mat], shell=False) proc.wait() proc = subprocess.Popen(['samtools', 'sort', '-@', '10', '-o', mat[:-3] + 'sorted.bam', mat[:-3] + 'bam'], shell=False) proc.wait() proc = subprocess.Popen(['shred', '-u', '-z', mat, sam, mat[:-3] + 'bam'], shell=False) proc.wait()
hisat2输出信息,也可见该目录下的mapping_information.txt
使用featurecount计算reads数
其中-a 是输入文件,-o 是输出结果,每次运行注意修改。
featureCounts -T 20 -t exon -g Name --readExtension5 70 --readExtension3 70 -p -O --donotsort -C -a /data2/masw_data/transcript/TGACv1.cdna.gff3 -o /data2/masw_data/transcript/TGACv1.cdna.reformat_expression_new.txt ATW_AOSW.match.sorted.bam ATW_AAOSW_6.match.sorted.bam ATW_ANOSW.match.sorted.bam ATW_LOSW_5.match.sorted.bam ATW_ADOSW.match.sorted.bam ATW_AEOSW.match.sorted.bam ATW_DOSW_2.match.sorted.bam ATW_POSW_6.match.sorted.bam ATW_IOSW_4.match.sorted.bam ATW_KOSW_4.match.sorted.bam ATW_ROSW_7.match.sorted.bam ATW_ALOSW_3.match.sorted.bam ATW_TOSW_8.match.sorted.bam ATW_VOSW_6.match.sorted.bam ATW_MOSW_5.match.sorted.bam ATW_NOSW_6.match.sorted.bam ATW_COSW.match.sorted.bam ATW_AGOSW_2.match.sorted.bam ATW_GOSW_3.match.sorted.bam ATW_HOSW_3.match.sorted.bam ATW_ABOSW_7.match.sorted.bam ATW_ACOSW.match.sorted.bam ATW_QOSW_7.match.sorted.bam ATW_AHOSW_3.match.sorted.bam SRR1175868.match.sorted.bam SRR1177760.match.sorted.bam SRR1177761.match.sorted.bam NG-5789_1A_lib7482.match.sorted.bam NG-5789_1B_lib7486.match.sorted.bam NG-5789_2A_lib7483.match.sorted.bam NG-5789_2B_lib7487.match.sorted.bam NG-5789_3A_lib7484.match.sorted.bam NG-5789_3B_lib7488.match.sorted.bam NG-5789_4A_lib7485.match.sorted.bam NG-5789_4B_lib7489.match.sorted.bam ATW_SOSW_8.match.sorted.bam ATW_AFOSW_2.match.sorted.bam ATW_AIOSW_2.match.sorted.bam ATW_AKOSW_2.match.sorted.bam ATW_FOSW_2.match.sorted.bam ATW_AMOSW_4.match.sorted.bam ERR392061.match.sorted.bam ERR392055.match.sorted.bam ERR392057.match.sorted.bam ERR392072.match.sorted.bam ERR392082.match.sorted.bam ERR392059.match.sorted.bam ERR392080.match.sorted.bam ERR392081.match.sorted.bam ERR392078.match.sorted.bam ERR392084.match.sorted.bam ERR392063.match.sorted.bam ERR392076.match.sorted.bam ERR392074.match.sorted.bam ERR392075.match.sorted.bam ERR392058.match.sorted.bam ERR392077.match.sorted.bam ERR392056.match.sorted.bam ERR392070.match.sorted.bam ERR392064.match.sorted.bam ERR392068.match.sorted.bam ERR392073.match.sorted.bam ERR392083.match.sorted.bam ERR392079.match.sorted.bam ERR392065.match.sorted.bam ERR392066.match.sorted.bam ERR392062.match.sorted.bam ERR392069.match.sorted.bam ERR392060.match.sorted.bam ERR392067.match.sorted.bam ERR392071.match.sorted.bam SRR1460549.match.sorted.bam SRR1460550.match.sorted.bam SRR1460551.match.sorted.bam SRR1460552.match.sorted.bam SRR1460553.match.sorted.bam SRR1460554.match.sorted.bam
计算FPKM。使用 fpkm.py .输入文件为上述featurecount输出文件
#!/usr/bin/env python# -*- coding: utf-8 -*- __author__ = 'shengwei ma'__author_email__ = 'shengweima@icloud.com'import numpy as npraw_total = [('root_Z10_rep1', 48869175), ('root_Z10_rep2', 43775892), ('root_Z13_rep1', 78098556), ('root_Z13_rep2', 38101219), ('root_Z39_rep1', 79909447), ('root_Z39_rep2', 40755855), ('stem_Z30_rep1', 46617982), ('stem_Z30_rep2', 38376167), ('stem_Z32_rep1', 51226000), ('stem_Z32_rep2', 36851453), ('stem_Z65_rep1', 39546386), ('stem_Z65_rep2',40007899), ('leaf_Z10_rep1', 37779196), ('leaf_Z10_rep2', 42809530), ('leaf_Z23_rep1', 43634977), ('leaf_Z23_rep2', 39944147), ('leaf_Z71_rep1', 41052670), ('leaf_Z71_rep2', 32451311), ('spike_Z32_rep1', 45825886), ('spike_Z32_rep2', 43105938), ('spike_Z39_rep1', 39932553), ('spike_Z39_rep2', 47541814), ('spike_Z65_rep1', 42669288), ('spike_Z65_rep2', 47926984), ('carpel', 47926984), ('carpel-like structure', 63914055), ('stamen', 72154863), ('latent_lepto_rep1', 31612988), ('latent_lepto_rep2', 40168491), ('diplo_dia_rep1', 56397064), ('diplo_dia_rep2', 43915096), ('zygo_pachy_rep1', 36976965), ('zygo_pachy_rep2', 37616043), ('metaphaseI_rep1', 26895947), ('metaphaseI_rep2', 32120026), ('grain_Z71_rep1', 43938792), ('grain_Z71_rep2', 36471154), ('grain_Z75_rep1', 47336764), ('grain_Z75_rep2', 51333413), ('grain_Z85_rep1', 36543140), ('grain_Z85_rep2', 31182678), ('Wheat_Room1_10DPA', 16712256), ('Wheat_Room1_10DPA_Rep', 22819483), ('Wheat_Room2_10DPA', 27121510), ('Wheat_Room2_10DPA_Rep', 29453109), ('Wheat_Room1_AL_20DPA', 30598515), ('Wheat_Room1_AL_20DPA_Rep', 28518937), ('Wheat_Room2_AL_20DPA', 24838220), ('Wheat_Room2_AL_20DPA_Rep', 27715580), ('Wheat_Room1_AL_20DPA_Extra1', 29978007), ('Wheat_Room1_AL_20DPA_Extra2', 30079461), ('Wheat_Room1_SE_20DPA', 25140145), ('Wheat_Room1_SE_20DPA_Rep', 24446796), ('Wheat_Room2_SE_20DPA', 21339690), ('Wheat_Room2_SE_20DPA_Rep', 22815780), ('Wheat_Room1_TC_20DPA', 16629117), ('Wheat_Room1_TC_20DPA_Rep', 27612315), ('Wheat_Room2_TC_20DPA', 25304622), ('Wheat_Room2_TC_20DPA_Rep', 25352139), ('Wheat_Room1_REF_20DPA', 29929219), ('Wheat_Room1_REF_20DPA_Rep', 26636425), ('Wheat_Room2_REF_20DPA', 24316737), ('Wheat_Room2_REF_20DPA_Rep', 29330096), ('Wheat_Room1_SE_30DPA', 20661506), ('Wheat_Room1_SE_30DPA_Rep', 22777481), ('Wheat_Room2_SE_30DPA', 30513836), ('Wheat_Room2_SE_30DPA_Rep', 21486098), ('Wheat_Room1_AL_SE_30DPA', 28821672), ('Wheat_Room1_AL_SE_30DPA_Rep', 20134665), ('Wheat_Room2_AL_SE_30DPA', 23721856), ('Wheat_Room2_AL_SE_30DPA_Rep', 24896811), ('wheat_23_1', 28444918), ('wheat_23_2', 67968193), ('wheat_23_3', 24321425), ('wheat_4_1', 35430306), ('wheat_4_2', 22527710), ('wheat_4_3', 16848204)]organs = open('1.txt', 'w')organs.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % ('Geneid', 'Chr', 'root_max', 'stem_max', 'leaf_max', 'spike_max', 'grain_max' , 'stamen_max', 'new_carpel'))with open('specific_gene_expression_new.txt', 'r') as f: # 此处注意修改输入文件 print "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" \ "\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" \ "\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" \ "\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t" % \ ('Geneid', 'Chr', 'Start', 'End', 'Strand', 'Length', 'root_Z10', 'root_Z13','root_Z39', 'stem_Z30', 'stem_Z32', 'stem_Z65', 'leaf_Z10', 'leaf_Z23', 'leaf_Z71', 'spike_Z32', 'spike_Z39', 'spike_Z65', 'carpel', 'carpel_like_structure', 'stamen', 'latet_lepto', 'diplo_dia', 'zygo_pachy', 'metaphaseI', 'grain_Z71', 'grain_Z75', 'grain_Z85', 'Wheat_10DPA', 'Wheat_AL_20DPA', 'Wheat_SE_20DPA', 'Wheat_TC_20DPA', 'Wheat_REF_20DPA', 'Wheat_SE_30DPA', 'Wheat_AL.SE_30DPA', 'wheat_23', 'wheat_4', 'root_Z10_std', 'root_Z13_std', 'root_Z39_std', 'stem_Z30_std', 'stem_Z32_std', 'stem_Z65_std', 'leaf_Z10_std', 'leaf_Z23_std', 'leaf_Z71_std', 'spike_Z32_std', 'spike_Z39_std', 'spike_Z65_std', 'carpel_std', 'carpel-like_std', 'stamen_std', 'latet_lepto_std', 'diplo_dia_std', 'zygo_pachy_std', 'metaphaseI_std', 'grain_Z71_std', 'grain_Z75_std', 'grain_Z85_std','Wheat_10DPA_std', 'Wheat_AL_20DPA_std','Wheat_SE_20DPA_std', 'Wheat_TC_20DPA_std', 'Wheat_REF_20DPA_std', 'Wheat_SE_30DPA_std', 'Wheat_AL.SE_30DPA_std', 'wheat_23_std', 'wheat_4_std') for line in f: if line.startswith('#') or line.startswith('Geneid'): pass else: new = line.strip().split('\t') (Geneid, Chr, Start, End, Strand, Length, root_Z10_rep1, root_Z10_rep2, root_Z13_rep1, root_Z13_rep2, root_Z39_rep1, root_Z39_rep2, stem_Z30_rep1, stem_Z30_rep2, stem_Z32_rep1, stem_Z32_rep2, stem_Z65_rep1, stem_Z65_rep2, leaf_Z10_rep1, leaf_Z10_rep2, leaf_Z23_rep1, leaf_Z23_rep2, leaf_Z71_rep1, leaf_Z71_rep2, spike_Z32_rep1, spike_Z32_rep2, spike_Z39_rep1, spike_Z39_rep2, spike_Z65_rep1, spike_Z65_rep2, carpel, carpel_like_structure, stamen, latet_lepto_rep1, latent_lepto_rep2, diplo_dia_rep1, diplo_dia_rep2, zygo_pachy_rep1, zygo_pachy_rep2, metaphaseI_rep1, metaphaseI_rep2, grain_Z71_rep1, grain_Z71_rep2, grain_Z75_rep1, grain_Z75_rep2, grain_Z85_rep1, grain_Z85_rep2, Wheat_Room1_10DPA, Wheat_Room1_10DPA_Rep, Wheat_Room2_10DPA, Wheat_Room2_10DPA_Rep, Wheat_Room1_AL_20DPA, Wheat_Room1_AL_20DPA_Rep, Wheat_Room2_AL_20DPA, Wheat_Room2_AL_20DPA_Rep, Wheat_Room1_AL_20DPA_Extra1, Wheat_Room1_AL_20DPA_Extra2, Wheat_Room1_SE_20DPA, Wheat_Room1_SE_20DPA_Rep, Wheat_Room2_SE_20DPA, Wheat_Room2_SE_20DPA_Rep, Wheat_Room1_TC_20DPA, Wheat_Room1_TC_20DPA_Rep, Wheat_Room2_TC_20DPA, Wheat_Room2_TC_20DPA_Rep, Wheat_Room1_REF_20DPA, Wheat_Room1_REF_20DPA_Rep, Wheat_Room2_REF_20DPA, Wheat_Room2_REF_20DPA_Rep, Wheat_Room1_SE_30DPA, Wheat_Room1_SE_30DPA_Rep, Wheat_Room2_SE_30DPA, Wheat_Room2_SE_30DPA_Rep, Wheat_Room1_AL_SE_30DPA, Wheat_Room1_AL_SE_30DPA_Rep, Wheat_Room2_AL_SE_30DPA, Wheat_Room2_AL_SE_30DPA_Rep, wheat_23_1, wheat_23_2, wheat_23_3, wheat_4_1, wheat_4_2, wheat_4_3) = new new_root_Z10_rep1 = int(root_Z10_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[0][-1])) new_root_Z10_rep2 = int(root_Z10_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[1][-1])) new_root_Z13_rep1 = int(root_Z13_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[2][-1])) new_root_Z13_rep2 = int(root_Z13_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[3][-1])) new_root_Z39_rep1 = int(root_Z39_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[4][-1])) new_root_Z39_rep2 = int(root_Z39_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[5][-1])) new_stem_Z30_rep1 = int(stem_Z30_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[6][-1])) new_stem_Z30_rep2 = int(stem_Z30_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[7][-1])) new_stem_Z32_rep1 = int(stem_Z32_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[8][-1])) new_stem_Z32_rep2 = int(stem_Z32_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[9][-1])) new_stem_Z65_rep1 = int(stem_Z65_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[10][-1])) new_stem_Z65_rep2 = int(stem_Z65_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[11][-1])) new_leaf_Z10_rep1 = int(leaf_Z10_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[12][-1])) new_leaf_Z10_rep2 = int(leaf_Z10_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[13][-1])) new_leaf_Z23_rep1 = int(leaf_Z23_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[14][-1])) new_leaf_Z23_rep2 = int(leaf_Z23_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[15][-1])) new_leaf_Z71_rep1 = int(leaf_Z71_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[16][-1])) new_leaf_Z71_rep2 = int(leaf_Z71_rep2) * pow(10.0 , 9) / (int(Length) * int(raw_total[17][-1])) new_spike_Z32_rep1 = int(spike_Z32_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[18][-1])) new_spike_Z32_rep2 = int(spike_Z32_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[19][-1])) new_spike_Z39_rep1 = int(spike_Z39_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[20][-1])) new_spike_Z39_rep2 = int(spike_Z39_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[21][-1])) new_spike_Z65_rep1 = int(spike_Z65_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[22][-1])) new_spike_Z65_rep2 = int(spike_Z65_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[23][-1])) new_carpel = int(carpel) * pow(10.0, 9) / (int(Length) * int(raw_total[24][-1])) new_carpel_like_structure = int(carpel_like_structure) * pow(10.0, 9) / (int(Length) * int(raw_total[25][-1])) new_stamen = int(stamen) * pow(10.0, 9) / (int(Length) * int(raw_total[26][-1])) new_latet_lepto_rep1 = int(latet_lepto_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[27][-1])) new_latet_lepto_rep2 = int(latent_lepto_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[28][-1])) new_diplo_dia_rep1 = int(diplo_dia_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[29][-1])) new_diplo_dia_rep2 = int(diplo_dia_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[30][-1])) new_zygo_pachy_rep1 = int(zygo_pachy_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[31][-1])) new_zygo_pachy_rep2 = int(zygo_pachy_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[32][-1])) new_metaphaseI_rep1 = int(metaphaseI_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[33][-1])) new_metaphaseI_rep2 = int(metaphaseI_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[34][-1])) new_grain_Z71_rep1 = int(grain_Z71_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[35][-1])) new_grain_Z71_rep2 = int(grain_Z71_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[36][-1])) new_grain_Z75_rep1 = int(grain_Z75_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[37][-1])) new_grain_Z75_rep2 = int(grain_Z75_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[38][-1])) new_grain_Z85_rep1 = int(grain_Z85_rep1) * pow(10.0, 9) / (int(Length) * int(raw_total[39][-1])) new_grain_Z85_rep2 = int(grain_Z85_rep2) * pow(10.0, 9) / (int(Length) * int(raw_total[40][-1])) Wheat_Room1_10DPA = int(Wheat_Room1_10DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[41][-1])) Wheat_Room1_10DPA_Rep = int(Wheat_Room1_10DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[42][-1])) Wheat_Room2_10DPA = int(Wheat_Room2_10DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[43][-1])) Wheat_Room2_10DPA_Rep = int(Wheat_Room2_10DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[44][-1])) Wheat_Room1_AL_20DPA = int(Wheat_Room1_AL_20DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[45][-1])) Wheat_Room1_AL_20DPA_Rep = int(Wheat_Room1_AL_20DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[46][-1])) Wheat_Room2_AL_20DPA = int(Wheat_Room2_AL_20DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[47][-1])) Wheat_Room2_AL_20DPA_Rep = int(Wheat_Room2_AL_20DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[48][-1])) Wheat_Room1_AL_20DPA_Extra1 = int(Wheat_Room1_AL_20DPA_Extra1) * pow(10.0, 9) / (int(Length) * int(raw_total[49][-1])) Wheat_Room1_AL_20DPA_Extra2 = int(Wheat_Room1_AL_20DPA_Extra2) * pow(10.0, 9) / (int(Length) * int(raw_total[50][-1])) Wheat_Room1_SE_20DPA = int(Wheat_Room1_SE_20DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[51][-1])) Wheat_Room1_SE_20DPA_Rep = int(Wheat_Room1_SE_20DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[52][-1])) Wheat_Room2_SE_20DPA = int(Wheat_Room2_SE_20DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[53][-1])) Wheat_Room2_SE_20DPA_Rep = int(Wheat_Room2_SE_20DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[54][-1])) Wheat_Room1_TC_20DPA = int(Wheat_Room1_TC_20DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[55][-1])) Wheat_Room1_TC_20DPA_Rep = int(Wheat_Room1_TC_20DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[56][-1])) Wheat_Room2_TC_20DPA = int(Wheat_Room2_TC_20DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[57][-1])) Wheat_Room2_TC_20DPA_Rep = int(Wheat_Room2_TC_20DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[58][-1])) Wheat_Room1_REF_20DPA = int(Wheat_Room1_REF_20DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[59][-1])) Wheat_Room1_REF_20DPA_Rep = int(Wheat_Room1_REF_20DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[60][-1])) Wheat_Room2_REF_20DPA = int(Wheat_Room2_REF_20DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[61][-1])) Wheat_Room2_REF_20DPA_Rep = int(Wheat_Room2_REF_20DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[62][-1])) Wheat_Room1_SE_30DPA = int( Wheat_Room1_SE_30DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[63][-1])) Wheat_Room1_SE_30DPA_Rep = int(Wheat_Room1_SE_30DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[64][-1])) Wheat_Room2_SE_30DPA = int(Wheat_Room2_SE_30DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[65][-1])) Wheat_Room2_SE_30DPA_Rep = int(Wheat_Room2_SE_30DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[66][-1])) Wheat_Room1_AL_SE_30DPA = int(Wheat_Room1_AL_SE_30DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[67][-1])) Wheat_Room1_AL_SE_30DPA_Rep = int(Wheat_Room1_AL_SE_30DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[68][-1])) Wheat_Room2_AL_SE_30DPA = int(Wheat_Room2_AL_SE_30DPA) * pow(10.0, 9) / (int(Length) * int(raw_total[69][-1])) Wheat_Room2_AL_SE_30DPA_Rep = int(Wheat_Room2_AL_SE_30DPA_Rep) * pow(10.0, 9) / (int(Length) * int(raw_total[70][-1])) wheat_23_1 = int(wheat_23_1) * pow(10.0, 9) / (int(Length) * int(raw_total[71][-1])) wheat_23_2 = int(wheat_23_2) * pow(10.0, 9) / (int(Length) * int(raw_total[72][-1])) wheat_23_3 = int(wheat_23_3) * pow(10.0, 9) / (int(Length) * int(raw_total[73][-1])) wheat_4_1 = int(wheat_4_1) * pow(10.0, 9) / (int(Length) * int(raw_total[74][-1])) wheat_4_2 = int(wheat_4_2) * pow(10.0, 9) / (int(Length) * int(raw_total[75][-1])) wheat_4_3 = int(wheat_4_3) * pow(10.0, 9) / (int(Length) * int(raw_total[76][-1])) root_Z10_mean = np.mean(np.array([new_root_Z10_rep1, new_root_Z10_rep2])) root_Z10_std = np.std(np.array([new_root_Z10_rep1, new_root_Z10_rep2])) root_Z13_mean = np.mean(np.array([new_root_Z13_rep1, new_root_Z13_rep2])) root_Z13_std = np.std(np.array([new_root_Z13_rep1, new_root_Z13_rep2])) root_Z39_mean = np.mean(np.array([new_root_Z39_rep1, new_root_Z39_rep2])) root_Z39_std = np.std(np.array([new_root_Z39_rep1, new_root_Z39_rep2])) stem_Z30_mean = np.mean(np.array([new_stem_Z30_rep1, new_stem_Z30_rep2])) stem_Z30_std = np.std(np.array([new_stem_Z30_rep1, new_stem_Z30_rep2])) stem_Z32_mean = np.mean(np.array([new_stem_Z32_rep1, new_stem_Z32_rep2])) stem_Z32_std = np.std(np.array([new_stem_Z32_rep1, new_stem_Z32_rep2])) stem_Z65_mean = np.mean(np.array([new_stem_Z65_rep1, new_stem_Z65_rep2])) stem_Z65_std = np.std(np.array([new_stem_Z65_rep1, new_stem_Z65_rep2])) leaf_Z10_mean = np.mean(np.array([new_leaf_Z10_rep1, new_leaf_Z10_rep2])) leaf_Z10_std = np.std(np.array([new_leaf_Z10_rep1, new_leaf_Z10_rep2])) leaf_Z23_mean = np.mean(np.array([new_leaf_Z23_rep1, new_leaf_Z23_rep2])) leaf_Z23_std = np.std(np.array([new_leaf_Z23_rep1, new_leaf_Z23_rep2])) leaf_Z71_mean = np.mean(np.array([new_leaf_Z71_rep1, new_leaf_Z71_rep2])) leaf_Z71_std = np.std(np.array([new_leaf_Z71_rep1, new_leaf_Z71_rep2])) spike_Z32_mean = np.mean(np.array([new_spike_Z32_rep1, new_spike_Z32_rep2])) spike_Z32_std = np.std(np.array([new_spike_Z32_rep1, new_spike_Z32_rep2])) spike_Z39_mean = np.mean(np.array([new_spike_Z39_rep1, new_spike_Z39_rep2])) spike_Z39_std = np.std(np.array([new_spike_Z39_rep1, new_spike_Z39_rep2])) spike_Z65_mean = np.mean(np.array([new_spike_Z65_rep1, new_spike_Z65_rep2])) spike_Z65_std = np.std(np.array([new_spike_Z65_rep1, new_spike_Z65_rep2])) latet_lepto_mean = np.mean(np.array([new_latet_lepto_rep1, new_latet_lepto_rep2])) latet_lepto_std = np.std(np.array([new_latet_lepto_rep1, new_latet_lepto_rep2])) diplo_dia_mean = np.mean(np.array([new_diplo_dia_rep1, new_diplo_dia_rep2])) diplo_dia_std = np.std(np.array([new_diplo_dia_rep1, new_diplo_dia_rep2])) zygo_pachy_mean = np.mean(np.array([new_zygo_pachy_rep1, new_zygo_pachy_rep2])) zygo_pachy_std = np.std(np.array([new_zygo_pachy_rep1, new_zygo_pachy_rep2])) metaphaseI_mean = np.mean(np.array([new_metaphaseI_rep1, new_metaphaseI_rep2])) metaphaseI_std = np.std(np.array([new_metaphaseI_rep1, new_metaphaseI_rep2])) grain_Z71_mean = np.mean(np.array([new_grain_Z71_rep1, new_grain_Z71_rep2])) grain_Z71_std = np.std(np.array([new_grain_Z71_rep1, new_grain_Z71_rep2])) grain_Z75_mean = np.mean(np.array([new_grain_Z75_rep1, new_grain_Z75_rep2])) grain_Z75_std = np.std(np.array([new_grain_Z75_rep1, new_grain_Z75_rep2])) grain_Z85_mean = np.mean(np.array([new_grain_Z85_rep1, new_grain_Z85_rep2])) grain_Z85_std = np.std(np.array([new_grain_Z85_rep1, new_grain_Z85_rep2])) root_max = np.max(np.array([new_root_Z10_rep1, new_root_Z10_rep2, new_root_Z13_rep1, new_root_Z13_rep2, new_root_Z39_rep1, new_root_Z39_rep2])) stem_max = np.max(np.array([new_stem_Z30_rep1, new_stem_Z30_rep2, new_stem_Z32_rep1, new_stem_Z32_rep2, new_stem_Z65_rep1, new_stem_Z65_rep2])) leaf_max = np.max(np.array([new_leaf_Z10_rep1, new_leaf_Z10_rep2, new_leaf_Z23_rep1, new_leaf_Z23_rep2, new_leaf_Z71_rep1, new_leaf_Z71_rep2])) spike_max = np.max(np.array([new_spike_Z32_rep1, new_spike_Z32_rep2, new_spike_Z39_rep1, new_spike_Z39_rep2, new_spike_Z65_rep1, new_spike_Z65_rep2])) grain_max = np.max(np.array([new_grain_Z71_rep1, new_grain_Z71_rep2, Wheat_Room2_10DPA, Wheat_Room2_10DPA_Rep, new_grain_Z85_rep1, new_grain_Z85_rep2])) stamen_max = np.mean(np.array([new_stamen, new_latet_lepto_rep1, new_latet_lepto_rep2, new_diplo_dia_rep1, new_diplo_dia_rep2, new_zygo_pachy_rep1, new_zygo_pachy_rep2, new_metaphaseI_rep1, new_metaphaseI_rep2])) organs.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (Geneid, Chr, root_max, stem_max, leaf_max, spike_max, grain_max , stamen_max, new_carpel)) Wheat_10DPA_mean = np.mean(np.array([Wheat_Room1_10DPA, Wheat_Room1_10DPA_Rep,Wheat_Room2_10DPA, Wheat_Room2_10DPA_Rep])) Wheat_10DPA_std = np.std(np.array([Wheat_Room1_10DPA, Wheat_Room1_10DPA_Rep,Wheat_Room2_10DPA, Wheat_Room2_10DPA_Rep])) Wheat_AL_20DPA_mean = np.mean(np.array([Wheat_Room1_AL_20DPA, Wheat_Room1_AL_20DPA_Rep,Wheat_Room2_AL_20DPA, Wheat_Room2_AL_20DPA_Rep, Wheat_Room1_AL_20DPA_Extra1, Wheat_Room1_AL_20DPA_Extra2])) Wheat_AL_20DPA_std = np.std(np.array([Wheat_Room1_AL_20DPA, Wheat_Room1_AL_20DPA_Rep,Wheat_Room2_AL_20DPA, Wheat_Room2_AL_20DPA_Rep, Wheat_Room1_AL_20DPA_Extra1, Wheat_Room1_AL_20DPA_Extra2])) Wheat_SE_20DPA_mean = np.mean(np.array([Wheat_Room1_SE_20DPA, Wheat_Room1_SE_20DPA_Rep, Wheat_Room2_SE_20DPA, Wheat_Room2_SE_20DPA_Rep])) Wheat_SE_20DPA_std = np.std(np.array([Wheat_Room1_SE_20DPA, Wheat_Room1_SE_20DPA_Rep, Wheat_Room2_SE_20DPA, Wheat_Room2_SE_20DPA_Rep])) Wheat_TC_20DPA_mean = np.mean(np.array([Wheat_Room1_TC_20DPA, Wheat_Room1_TC_20DPA_Rep, Wheat_Room2_TC_20DPA, Wheat_Room2_TC_20DPA_Rep])) Wheat_TC_20DPA_std = np.std(np.array([Wheat_Room1_TC_20DPA, Wheat_Room1_TC_20DPA_Rep, Wheat_Room2_TC_20DPA, Wheat_Room2_TC_20DPA_Rep])) Wheat_REF_20DPA_mean = np.mean(np.array([Wheat_Room1_REF_20DPA, Wheat_Room1_REF_20DPA_Rep, Wheat_Room2_REF_20DPA, Wheat_Room2_REF_20DPA_Rep])) Wheat_REF_20DPA_std = np.std(np.array([Wheat_Room1_REF_20DPA, Wheat_Room1_REF_20DPA_Rep, Wheat_Room2_REF_20DPA, Wheat_Room2_REF_20DPA_Rep])) Wheat_SE_30DPA_mean = np.mean(np.array([Wheat_Room1_SE_30DPA, Wheat_Room1_SE_30DPA_Rep, Wheat_Room2_SE_30DPA, Wheat_Room2_SE_30DPA_Rep])) Wheat_SE_30DPA_std = np.std(np.array([Wheat_Room1_SE_30DPA, Wheat_Room1_SE_30DPA_Rep, Wheat_Room2_SE_30DPA, Wheat_Room2_SE_30DPA_Rep])) Wheat_AL_SE_30DPA_mean = np.mean(np.array([Wheat_Room1_AL_SE_30DPA, Wheat_Room1_AL_SE_30DPA_Rep, Wheat_Room2_AL_SE_30DPA, Wheat_Room2_AL_SE_30DPA_Rep])) Wheat_AL_SE_30DPA_std = np.std(np.array([Wheat_Room1_AL_SE_30DPA, Wheat_Room1_AL_SE_30DPA_Rep, Wheat_Room2_AL_SE_30DPA, Wheat_Room2_AL_SE_30DPA_Rep])) wheat_23_mean = np.mean(np.array([wheat_23_1, wheat_23_2, wheat_23_3])) wheat_23_std = np.std(np.array([wheat_23_1, wheat_23_2, wheat_23_3])) wheat_4_mean = np.mean(np.array([wheat_4_1, wheat_4_2, wheat_4_3])) wheat_4_std = np.std(np.array([wheat_4_1, wheat_4_2, wheat_4_3])) print "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" \ "\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" \ "\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" \ "\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % \ (Geneid, Chr, Start, End, Strand, Length, root_Z10_mean, root_Z13_mean,root_Z39_mean, stem_Z30_mean, stem_Z32_mean, stem_Z65_mean, leaf_Z10_mean, leaf_Z23_mean, leaf_Z71_mean, spike_Z32_mean, spike_Z39_mean, spike_Z65_mean, new_carpel, new_carpel_like_structure, new_stamen, latet_lepto_mean, diplo_dia_mean, zygo_pachy_mean, metaphaseI_mean, grain_Z71_mean, grain_Z75_mean, grain_Z85_mean, Wheat_10DPA_mean, Wheat_AL_20DPA_mean, Wheat_SE_20DPA_mean, Wheat_TC_20DPA_mean, Wheat_REF_20DPA_mean, Wheat_SE_30DPA_mean, Wheat_AL_SE_30DPA_mean, wheat_23_mean, wheat_4_mean, root_Z10_std, root_Z13_std, root_Z39_std, stem_Z30_std, stem_Z32_std, stem_Z65_std, leaf_Z10_std, leaf_Z23_std, leaf_Z71_std, spike_Z32_std, spike_Z39_std, spike_Z65_std, 'null', 'null', 'null', latet_lepto_std, diplo_dia_std, zygo_pachy_std, metaphaseI_std, grain_Z71_std, grain_Z75_std, grain_Z85_std, Wheat_10DPA_std, Wheat_AL_20DPA_std, Wheat_SE_20DPA_std, Wheat_TC_20DPA_std, Wheat_REF_20DPA_std, Wheat_SE_30DPA_std, Wheat_AL_SE_30DPA_std, wheat_23_std, wheat_4_std)organs.close()
0 0
- RNA_seq表达分析
- RNA_Seq差异表达分析流程
- 基因表达分析-距离矩阵
- 基因表达量计算与差异表达分析常见问题
- 表达
- RNA-seq差异表达分析工作流程
- 基于RNA-seq的基因表达分析
- RNA-seq中的基因表达量计算和表达差异分析
- 差异表达分析软件GFOLD安装以及GSL安装问题
- 一个R程序,表达差异基因:探针分析
- 基因芯片(Affymetrix)分析3:获取差异表达基因
- 基因芯片(Affymetrix)分析3:获取差异表达基因
- 基因芯片(Affymetrix)分析3:获取差异表达基因
- UML应用:业务内涵的分析抽象&表达
- UML应用:业务内涵的分析抽象&表达
- Affymetrix芯片分析:获取差异表达基因系列三_SAM
- Affymetrix芯片分析:获取差异表达基因系列一
- Affymetrix芯片分析:获取差异表达基因系列三_SAM
- elasticsearch配置详解
- ProgressBar样式设置
- connect_timeout问题
- shell脚本
- pycharm破解
- RNA_seq表达分析
- 电路设计以及PCB制作中VCC、VDD、VEE、VSS、VPP的解释
- c++primer学习笔记-----2.3复合类型
- Problem O-15 Let the balloon rise
- 电脑上网上不去(包括QQ可以上网网页打不开)
- Android中Handler Runnable与Thread的区别详解
- 【2017最新题库】通识课尔雅人文的物理学答案题库
- 亡命逃窜
- Android ListView setOnItemClickListener/setOnItemSelectedListener,无效