コード例 #1
0
ファイル: qcReads.py プロジェクト: CGSbioinfo/MethylSeq
    ncores=int(args.ncores)

    # Read sample names text file
    sample_names_file=args.sample_names_file
    sampleNames = functions.read_sample_names(sample_names_file)

    # Set input and output directories if not 'rawReads/'
    in_dir=path + '/' + args.in_dir
    out_dir=path + '/' +args.out_dir
    out_dir_report=path + '/' + args.out_dir_report

    # Create out_dir_report
    functions.make_sure_path_exists(out_dir_report)

    # Detect if files are gz 
    gz = functions.check_gz(in_dir)

    # Run fastqc
    Parallel(n_jobs=ncores)(delayed(qc_check)(i) for i in sampleNames)

    # Number of reads per sample
    os.system("Rscript bin/indexQC.R " + in_dir + " " + out_dir_report) 








コード例 #2
0
    params_file = args.analysis_info_file
    path = functions.read_parameters_file(params_file)['Working directory']
    refGenome = functions.read_parameters_file(params_file)['Reference Genome']
    strand = functions.read_parameters_file(params_file)['strand']
    strand_piccard, strand_htseq = functions.get_strand(strand)
    gtfFile = functions.read_parameters_file(params_file)['GTF File']

    os.chdir(path)

    # Read sample names text file
    sampleNames = functions.read_sample_names()

    # Set input and output directories if not '/'
    in_dir = args.in_dir
    out_dir = args.out_dir
    functions.make_sure_path_exists(out_dir)
    mapping_summary_file = args.mapping_summary_file

    # Detect if files are gz
    gz = functions.check_gz(in_dir)

    # Count command
    Parallel(n_jobs=7)(delayed(counting)(i) for i in sampleNames)

    # QC
    os.system("Rscript /usr/local/bin/countsLog_rnaseq.R " + out_dir + ' ' +
              mapping_summary_file)
    os.system("Rscript /usr/local/bin/library_proportion.R " + out_dir + ' ' +
              out_dir + ' ' + gtfFile)