ch = args.ch
cell = args.cell
resolution_polarity = args.resolution
resolution = args.resolution
exp_factor = 4
percentile = args.percentile
fork_speed = args.fspeed
kon = 0.005
ndiff = args.ndiff
nsim = args.nsim

if args.signal == "peak":
    x, d3p = detect_peaks(start,
                          end,
                          ch,
                          resolution_polarity=resolution_polarity,
                          exp_factor=exp_factor,
                          percentile=percentile,
                          cell=cell,
                          nanpolate=True)

    if args.correct:
        x, DNaseI = replication_data(cell,
                                     "DNaseI",
                                     chromosome=ch,
                                     start=start,
                                     end=end,
                                     resolution=resolution,
                                     raw=False)
        x, CNV = replication_data(cell,
                                  "CNV",
                                  chromosome=ch,
Beispiel #2
0
    name_w = args.name + "_%i_%i_%i" % (ch, start, end)

    if args.signal in ["peak", "peakRFDonly"]:
        print("Percentile", percentile, args.recomp, args.gsmooth, args.dec,
              args.smoothpeak)
        rfd_only = False
        if args.signal == "peakRFDonly":
            rfd_only = True
        x, d3p = detect_peaks(start,
                              end,
                              ch,
                              resolution_polarity=resolution_polarity,
                              exp_factor=exp_factor,
                              percentile=percentile,
                              cell=cell,
                              cellMRT=comp,
                              cellRFD=cellseq,
                              nanpolate=True,
                              recomp=args.recomp,
                              gsmooth=args.gsmooth,
                              dec=args.dec,
                              fsmooth=args.smoothpeak,
                              expRFD=expRFD,
                              rfd_only=rfd_only)

        if resolution != resolution_polarity:
            x, d3p0 = detect_peaks(start,
                                   end,
                                   ch,
                                   resolution_polarity=resolution,
                                   exp_factor=exp_factor,
                                   percentile=percentile,
Beispiel #3
0
    248956422, 242193529, 198295559, 190214555, 181538259, 170805979,
    159345973, 145138636, 138394717, 133797422, 135086622, 133275309,
    114364328, 107043718, 101991189, 90338345, 83257441, 80373285, 58617616,
    64444167, 46709983, 50818468
]
data = []

for chrom, length in enumerate(chromlength, 1):

    data.append(
        detect_peaks(0,
                     length // 1000,
                     chrom,
                     resolution_polarity=resolution_polarity,
                     exp_factor=exp_factor,
                     fsmooth=args.smoothpeak,
                     percentile=percentile,
                     cell=cell,
                     cellMRT=args.cellMRT,
                     cellRFD=args.cellRFD,
                     recomp=args.recomp,
                     dec=args.dec)[1])

data = np.concatenate(data)
data[data == 0] = np.nan
data[~np.isnan(data)] = 1
pd.DataFrame({"signalValue": data}).to_csv("ARS.csv", index=False)

with open(args.name, "wb") as f:
    pickle.dump(data, f)