Skip to content

regress_pwm with motif_num > 1 #34

Description

@yonatans2
library(prego)
load("/net/mraid20/ifs/wisdom/tanay_lab/tgdata/users/yonshap/proj/mmcortex/output/MPRA/mpra_prego_data.rda")
prego_mpra <- regress_pwm(sequences = tbl_mpra_seqs, response = tbl_mpra, motif_num = 4)
ℹ Using 5 bins of size 40 bpRunning regression for 4 motifs

── Running first regression ──

ℹ Using 5 bins of size 40 bpUsing "r2" as the final metricNumber of response variables: 8

── Generate candidate kmers

── Regress each candidate kmerRunning regression on 26 candidate kmersBidirectional: TRUE

...kmer: "CGGTG*ACT", score (r2): 0.00160458151361125kmer: "GTA*GACGG", score (r2): 0.00153592844677623kmer: "GTAAG*CGG", score (r2): 0.00301175495505033kmer: "TA*GACGGT", score (r2): 0.000621375777523677kmer: "TAAG*CGGT", score (r2): 0.000785608254398136kmer: "TATAG*TAA", score (r2): 0.00923729984210879Best match in the database: "HOCOMOCO.ATOH1_HUMAN.H11MO.0.B", cor: 0.855Best motif: "***AGATA*GAT***", score (r2): 0.0295539826452405R2 for models 1, 2, 3, and 4: 1, 0.0118910457065785, 0.00315125565289002, 0.0129680234050577, 0.00660287176430303, 0.000551345644021713, 0.00283192566909634, 0.00212289201685585, 0.0118910457065785, 1, 9.46374496342389e-05, 0.00531800308025085, 0.000594129157913513, 0.000226539758160116, 5.15332172466543e-05, 0.000432008692663793, 0.00315125565289002, 9.4637449634239e-05, …, 0.00957589407994158, and 1Improvement in R2: 0.988108954293421, 0, -0.00873979005368847, 0.00107697769847918, -0.00528817394227547, -0.0113397000625568, -0.00905912003748216, -0.00976815368972265, 6.93889390390723e-18, 0.988108954293421, -0.0117964082569443, -0.00657304262632764, -0.011296916548665, -0.0116645059484184, -0.0118395124893318, -0.0114590370139147, -0.00873979005368848, -0.0117964082569443, …, -0.00231515162663691, and 0.988108954293421
Error in data.frame(model = 1:motif_num, score = scores, comb_score = comb_scores,  :
  arguments imply differing number of rows: 4, 25, 193
In addition: Warning message:
In comb_scores[1] <- res$r2 :
  number of items to replace is not a multiple of replacement length

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions