コード例 #1
0
ファイル: cnv_pipeline.py プロジェクト: ZhiweiHwang/Rhea_Chip
	def Step9_bedAnalysis(self):
		jobs_tool = bedAnalysis(bedAnalysis_path=os.path.join(Rhea_Chip_Home, "tools", "cnv", "bedAnalysis.py"))
		s_out = os.path.join(self.script, "Step9.bedAnalysis.sh")
		bash = BASH("bedAnalysis", s_out, self.log)
		cd = jobs_tool.analysis(region=self.region, reference=self.reference, rmsk=self.rmsk,
		                        outdir=self.outdir, depthfile=",".join(self.SamplesDepth.values()))
		cd = bash.stat_command_formact(cd, "bed region analysis")
		bash.write(bash.bash_header_and_foot(cd, 'CNV bed region analysis'))
		bash.close()
コード例 #2
0
ファイル: cnv_pipeline.py プロジェクト: tiehan/Rhea_Chip
 def Step9_bedAnalysis(self):
     jobs_tool = bedAnalysis(bedAnalysis_path=os.path.join(
         Rhea_Chip_Home, "tools", "cnv", "bedAnalysis.py"))
     s_out = os.path.join(self.script, "Step9.bedAnalysis.sh")
     bash = BASH("bedAnalysis", s_out, self.log)
     cd = jobs_tool.analysis(region=self.region,
                             reference=self.reference,
                             rmsk=self.rmsk,
                             outdir=self.outdir,
                             depthfile=",".join(self.SamplesDepth.values()))
     cd = bash.stat_command_formact(cd, "bed region analysis")
     bash.write(bash.bash_header_and_foot(cd, 'CNV bed region analysis'))
     bash.close()
コード例 #3
0
ファイル: cnv_pipeline.py プロジェクト: ZhiweiHwang/Rhea_Chip
	def Step12_CNVCall(self):
		jobs_tool = batCNV(batCNV_path=os.path.join(Rhea_Chip_Home, "tools", "cnv", "batCNV.py"))
		for sample in self.samples:
			s_out = os.path.join(self.script, "Step12.CNVCall.%s.sh" % sample)
			bash = BASH("%s.CNVCall" % sample, s_out, self.log)
			cd = jobs_tool.analysis(indir=self.outdir, dbdir=self.databases, sample=sample, correct_win_len=self.winlen,
			                        correct_shift_len=self.siftlen, reference=self.reference, plot=self.plot)
			cd = bash.stat_command_formact(cd, "%s CNV calling" % sample)
			bash.write(bash.bash_header_and_foot(cd, '%s CNV calling' % sample))
			bash.close()
コード例 #4
0
ファイル: cnv_pipeline.py プロジェクト: ZhiweiHwang/Rhea_Chip
	def Step11_WinCorrect(self):
		jobs_tool = WinCorrect(WinCorrect_path=os.path.join(Rhea_Chip_Home, "tools", "cnv", "WinCorrect.py"))
		for chrom in self.contigs:
			s_out = os.path.join(self.script, "Step11.WinCorrect.%s.sh" % chrom)
			bash = BASH("%s.WinCorrect" % chrom, s_out, self.log)
			cd = jobs_tool.analysis(region=self.region, chromstat=os.path.join(self.outdir, "chrom.stat"), chrom=chrom,
			                        indir=self.outdir, correct_win_len=self.winlen, correct_shift_len=self.siftlen)
			cd = bash.stat_command_formact(cd, "%s windows analysis and Correct" % chrom)
			bash.write(bash.bash_header_and_foot(cd, '%s windows analysis and Correct' % chrom))
			bash.close()
コード例 #5
0
ファイル: cnv_pipeline.py プロジェクト: tiehan/Rhea_Chip
 def Step12_CNVCall(self):
     jobs_tool = batCNV(batCNV_path=os.path.join(Rhea_Chip_Home, "tools",
                                                 "cnv", "batCNV.py"))
     for sample in self.samples:
         s_out = os.path.join(self.script, "Step12.CNVCall.%s.sh" % sample)
         bash = BASH("%s.CNVCall" % sample, s_out, self.log)
         cd = jobs_tool.analysis(indir=self.outdir,
                                 dbdir=self.databases,
                                 sample=sample,
                                 correct_win_len=self.winlen,
                                 correct_shift_len=self.siftlen,
                                 reference=self.reference,
                                 plot=self.plot)
         cd = bash.stat_command_formact(cd, "%s CNV calling" % sample)
         bash.write(bash.bash_header_and_foot(cd,
                                              '%s CNV calling' % sample))
         bash.close()
コード例 #6
0
ファイル: cnv_pipeline.py プロジェクト: ZhiweiHwang/Rhea_Chip
	def Step10_GCcorrect(self):
		jobs_tool = GCcorrect(GCcorrect_path=os.path.join(Rhea_Chip_Home, "tools", "cnv", "GCcorrect.py"))
		wingc = os.path.join(self.outdir, "win.gc")
		posgc = os.path.join(self.outdir, "pos.gc")
		chromstat = os.path.join(self.outdir, "chrom.stat")
		for sample in self.samples:
			cd = jobs_tool.correct(sample=sample, input=self.SamplesDepth[sample],
			                       outdir=self.outdir, wingc=wingc,
			                       posgc=posgc, chromstat=chromstat)
			s_out = os.path.join(self.script, "Step10.GCcorrect.%s.sh" % sample)
			bash = BASH("%s.GCcorrect" % sample, s_out, self.log)
			cd = bash.stat_command_formact(cd, "Sample depth correct with GC")
			bash.write(bash.bash_header_and_foot(cd, 'Sample depth correct with GC'))
			bash.close()
コード例 #7
0
ファイル: cnv_pipeline.py プロジェクト: tiehan/Rhea_Chip
 def Step10_GCcorrect(self):
     jobs_tool = GCcorrect(GCcorrect_path=os.path.join(
         Rhea_Chip_Home, "tools", "cnv", "GCcorrect.py"))
     wingc = os.path.join(self.outdir, "win.gc")
     posgc = os.path.join(self.outdir, "pos.gc")
     chromstat = os.path.join(self.outdir, "chrom.stat")
     for sample in self.samples:
         cd = jobs_tool.correct(sample=sample,
                                input=self.SamplesDepth[sample],
                                outdir=self.outdir,
                                wingc=wingc,
                                posgc=posgc,
                                chromstat=chromstat)
         s_out = os.path.join(self.script,
                              "Step10.GCcorrect.%s.sh" % sample)
         bash = BASH("%s.GCcorrect" % sample, s_out, self.log)
         cd = bash.stat_command_formact(cd, "Sample depth correct with GC")
         bash.write(
             bash.bash_header_and_foot(cd, 'Sample depth correct with GC'))
         bash.close()
コード例 #8
0
ファイル: cnv_pipeline.py プロジェクト: tiehan/Rhea_Chip
 def Step11_WinCorrect(self):
     jobs_tool = WinCorrect(WinCorrect_path=os.path.join(
         Rhea_Chip_Home, "tools", "cnv", "WinCorrect.py"))
     for chrom in self.contigs:
         s_out = os.path.join(self.script,
                              "Step11.WinCorrect.%s.sh" % chrom)
         bash = BASH("%s.WinCorrect" % chrom, s_out, self.log)
         cd = jobs_tool.analysis(region=self.region,
                                 chromstat=os.path.join(
                                     self.outdir, "chrom.stat"),
                                 chrom=chrom,
                                 indir=self.outdir,
                                 correct_win_len=self.winlen,
                                 correct_shift_len=self.siftlen)
         cd = bash.stat_command_formact(
             cd, "%s windows analysis and Correct" % chrom)
         bash.write(
             bash.bash_header_and_foot(
                 cd, '%s windows analysis and Correct' % chrom))
         bash.close()