示例#1
0
from hcacn.steps import Cuffnorm
from hcacn.core import Configure, Schedule

import os

Configure.setRefDir('ref')
Configure.setGenome('hg19')

cfnm = Cuffnorm(
    outputdir='./',
    markerInput='Cuffquant.0.suffix',
    gtfInput='./minidata/genome.gtf',
    cxbInput='/data/songshaoming/qat_results/Cuffquant.0.suffix/abundances.cxb'
)

Schedule.run()
示例#2
0
# -*- coding: utf-8 -*-
"""
@author: Zhenyi Wang
 """
from hcacn.core import Configure, Schedule
from hcacn.steps import Deseq2

#Configure.setIdentity('zywang')
Configure.enableDocker(False)
Deseq2(matrixdata="./minidata/Deseq2/Deseq2testdata.txt",
       annotation="./minidata/Deseq2/condition.csv",
       outputpath=None)
Schedule.run()
示例#3
0
from hcacn.core import Schedule, Configure
from hcacn.steps import FastqDump
from hcacn.steps import Hisat2
from hcacn.steps import Tophat2
from hcacn.steps import SamToBam
from hcacn.steps import BamSort
from hcacn.steps import Cufflinks
from hcacn.steps import Cuffmerge
from hcacn.steps import Cuffquant
from hcacn.steps import Cuffdiff
from hcacn.steps import FastQC
from hcacn.steps import Stringtie

Configure.setIdentity('sqchen32')
Configure.setThreads(16)


def smartseq_flow(sraInput, ht2Idx_ref, gtf_ref, fa_ref, threads):
    fastq_dump = FastqDump(sraInput1=sraInput)
    hisat = Hisat2(ht2Idx=ht2Idx_ref)(fastq_dump)
    sam2bam = SamToBam()(hisat)
    bamsort = BamSort()(sam2bam)
    cufflinks = Cufflinks(gtfInput=gtf_ref)(bamsort)
    cuffmerge = Cuffmerge(faInput=fa_ref, gtfInput=gtf_ref)(cufflinks)
    cuffquant = Cuffquant()(bamsort, cuffmerge)
    cuffdiff = Cuffdiff(faInput=fa_ref)(cuffmerge, cuffquant)
    Schedule.run()


def smartseq_flow2(sraInput, ht2Idx_ref, gtf_ref, fa_ref, threads):
    fastq_dump = FastqDump(sraInput1=sraInput)
示例#4
0
# -*- coding: utf-8 -*-
"""
@author: Zhenyi Wang
 """
from hcacn.core import Configure, Schedule
from hcacn.steps import Deseq2

Configure.setIdentity('zywang')
Deseq2(matrixdata = "./minidata/Deseq2/Deseq2testdata.txt", annotation = "./minidata/Deseq2/condition.csv", outputpath = None)
Schedule.run()
示例#5
0
from hcacn.steps import TrimPolyA
from hcacn.steps import BamToFastq
from hcacn.steps import StarAlign
from hcacn.steps import SortBam
from hcacn.steps import MergeBamAlign
from hcacn.steps import TagGene
from hcacn.steps import DetectError
from hcacn.steps import DigitalExpression
from hcacn.steps import EasyTreat
from hcacn.steps import MonocleQC
from hcacn.steps import Monocle_dimreduce_cluster
from hcacn.core import Configure, Schedule
import os

#Configure.enableDocker(False)
Configure.setIdentity('lcy2')

f2b = FastqToBam(fastqInput1='./minidata/dropseq/read1',
                 fastqInput2='./minidata/dropseq/read2')
#fastqInput1 = '../data/hgmm_100/read1', fastqInput2 = '../data/hgmm_100/read2')
bm = BamMerge()(f2b)
tbc = TagBarcode(baseStart=1,
                 baseEnd=16,
                 baseQuality=10,
                 barcodeRead=1,
                 discardRead=False,
                 tagName='XC',
                 numBaseBelowQuality=1)(bm)
tbm = TagBarcode(baseStart=17,
                 baseEnd=26,
                 baseQuality=10,
示例#6
0
# -*- coding: utf-8 -*-
"""
@Time    : 2018/4/3 15:12
@Author  : Weizhang
@FileName: test_FlowATACAnalysis.py
"""

from hcacn.core import Configure, Schedule
from hcacn.flows import FlowATACAnalysis

Configure.setIdentity('ATAC')

result=FlowATACAnalysis(bamInput='./minidata/atac/selectedBam',
                        peakInput='./minidata/atac/others/top_peaks.bed',
                        refdir='/data8t_1/ref/atac/hg19_bowtie2',
                        genome='hg19',
                        threads=10,
                        resultDir='./result_ATAC')()

示例#7
0
# -*- coding: utf-8 -*-

from hcacn.core import Configure, Schedule
from hcacn.steps import SingleCellExperiment, SC3_DE, SC3_Cluster

#Configure.setRefDir('/data8t_1/hca/ref/hg19_bowtie2')
#Configure.setGenome('hg19')
Configure.setIdentity('yinqijin')

# test single input file
# stf = SingleCellExperiment(matrix_file='/data8t_1/hca/zuoye/minidata/downstream/matrix/matrix.csv',
# 			ann_file = '/data8t_1/hca/zuoye/minidata/downstream/annotation/annotation.csv',
#                  matrix_format = 'ORIGIN',
#                  #outputpath = None,
# 			)

# test multi input file and setting output folder
sce = SingleCellExperiment(
    matrix_file='/data8t_1/hca/zuoye/minidata/downstream/matrix/',
    ann_file='/data8t_1/hca/zuoye/minidata/downstream/annotation/',
    matrix_format='ORIGIN',
    outputpath='step_my',
)

sc3_de = SC3_DE(
    outputpath=None,
    cluster_num=4,
)(sce)

sc3_cluster = SC3_Cluster(
    outputpath="./step_my_sc3_cluster",
示例#8
0
# -*- coding: utf-8 -*-
from hcacn.core import Configure, Schedule
from hcacn.flows import FlowExample
Configure.setIdentity('weizheng1')

rs = FlowExample(fastqInput1='./minidata/atac/end1',
                 fastqInput2='./minidata/atac/end2',
                 refdir='/data8t_1/hca/ref/hg19_bowtie2',
                 genome='hg19',
                 threads=4,
                 resultDir='result')()
示例#9
0
from hcacn.steps import Bowtie2
from hcacn.steps import AdapterRemoval
from hcacn.core import Configure, Schedule

import os

Configure.setRefDir('/home/wzhang/genome/hg19_bowtie2/')
Configure.setGenome('hg19')
#Configure.setIdentity('zwei')
Configure.enableDocker(False)

rs = Bowtie2(fastqInput1='./minidata/atac/end1',
             fastqInput2='./minidata/atac/end2')

Schedule.run()
示例#10
0
# -*- coding: utf-8 -*-
"""
@author: Zhenyi Wang
2018/3/29
"""
from hcacn.core import Configure, Schedule
from hcacn.flows import MatrixPreprocess

Configure.setIdentity('MatrixPreprocessflowtest')

matObj = MatrixPreprocess(matrixdata="./minidata/matrixRW/matrix.txt",
                          outputpath=None)()
示例#11
0
from hcacn.steps import Cellranger
from hcacn.steps import Seuratpreprocessing
from hcacn.steps import Seuratrun
from hcacn.core import Configure, Schedule

Configure.setIdentity('fengchen')

test = Cellranger(
    fastqInput='/home/hca/fengchen/data/10Xdata/fastqs/',
    refile=
    '/home/hca/fengchen/data/10Xdata/refdata-cellranger-hg19_and_mm10-1.2.0',
    expectcells=100)
test2 = Seuratpreprocessing(
    rscript='/home/hca/fengchen/zuoye/Seuratpreprocessing.R')(test)
test3 = Seuratrun(rscript='/home/hca/fengchen/zuoye/Seuratrun.R')(test2)

Schedule.run()

print('')
示例#12
0
# coding: utf-8
from hcacn.core import Step,Configure,Schedule
from hcacn.steps import FastQC
Configure.setIdentity("yinqijin")

Configure.enableDocker(True)
# Folder Test
# fastqc = FastQC('./minidata/test_fastqc/','fastq',)
# FileTest
#fastqc = FastQC('./minidata/smartseq/fastq/','fastq',)
fastqc = FastQC('./minidata/smartseq/fastq/',)
Schedule.run()
示例#13
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-07 10:27:03
# @Author  : Zhenyi Wang
# @Email: [email protected]

from hcacn.core import Configure, Schedule
from hcacn.flows import Cluster

Configure.setIdentity('Clustertest')
#test monocle
clusterObj = Cluster(
    matrixdata="./minidata/Monocle/out_gene_exon_tagged.dge.txt",
    algorithm='Monocle',
    resultDir='./result')()
#test sc3
#ClusterObj= Cluster(sc3matrix_file = "./minidata/sc3cluster/",
#	                sc3ann = './minidata/sc3annotation/',
#	                algorithm = 'sc3', resultDir='./result')()
示例#14
0
# -*- coding: utf-8 -*-
"""
@Time    : 2018/3/29 15:01
@Author  : Weizhang
@FileName: test_LibComplexity.py
"""
from hcacn.steps import LibComplexity
from hcacn.core import Configure, Schedule

Configure.setRefDir('/data8t_1/hca/ref/hg19_bowtie2')
Configure.setGenome('hg19')
Configure.setIdentity('ATAC')

lcpx = LibComplexity(bamInput='./minidata/atac/BamForTest')

Schedule.run()
示例#15
0
from hcacn.steps import Cufflinks
from hcacn.core import Configure,Schedule

import os

Configure.setRefDir(os.path.join(os.path.expanduser('~'),'songshaoming/ref'))
Configure.setGenome('hg19')

cflk = Cufflinks(bamInput=['./minidata/accepted_hits.bam'],
				gtfInput=['./minidata/genome.gtf'],
				outputDir=['./']
				)

Schedule.run()
示例#16
0
from hcacn.steps import EasyTreat
from hcacn.core import Configure, Schedule

import os

#Configure.enableDocker(False)
Configure.setIdentity('cyliu')

pt = EasyTreat(
    dgeInput='./step_13_DigitalExpression/out_gene_exon_tagged.dge.txt.gz')
Schedule.run()
示例#17
0
import sys

sys.path.append("/data8t_1/chenshengquan/zuoye")

from hcacn.core import Configure, Schedule
from hcacn.flows import FlowSmartseq

Configure.setIdentity('sqchen_f6')
### cuffquant
# rs=FlowSmartseq(sraInput='/data8t_1/chenshengquan/minidata/test_sra',alignMethod='hisat2', refdir='/data8t_1/ref/smartseq',genome='hg19',threads=16,resultDir='./resultFlowSmartseq_1')()
# rs=FlowSmartseq(sraInput='/data8t_1/chenshengquan/minidata/test_sra', alignMethod='tophat2', refdir='/data8t_1/ref/smartseq',genome='hg19',threads=16,resultDir='./resultFlowSmartseq_tophat2')()
### fastq input
# rs=FlowSmartseq(fastqInput1='/data8t_1/chenshengquan/minidata/test_fastq1', fastqInput2='/data8t_1/chenshengquan/minidata/test_fastq2', alignMethod='hisat2', refdir='/data8t_1/ref/smartseq',genome='hg19',threads=16,resultDir='./resultFlowSmartseq_Hisat2_fastq')()

### HTSeq
# rs=FlowSmartseq(sraInput='/data8t_1/chenshengquan/minidata/test_sra',alignMethod='hisat2', refdir='/data8t_1/ref/smartseq',genome='hg19',threads=16,resultType='htseq', resultDir='./resultFlowSmartseq_Hisat2_htseq')()
### fastq input
rs = FlowSmartseq(fastqInput1='/data8t_1/chenshengquan/minidata/test_fastq1',
                  fastqInput2='/data8t_1/chenshengquan/minidata/test_fastq2',
                  alignMethod='hisat2',
                  refdir='/data8t_1/ref/smartseq',
                  genome='hg19',
                  threads=16,
                  resultType='htseq',
                  resultDir='./resultFlowSmartseq_Hisat2_fastq_htseq')()