hugheylab / phers

https://phers.hugheylab.org
0 stars 0 forks source link

lintr found issues with code #52

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago
  1. R/utils.R line 107: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L107)
    n_het = n_hom = n_wt = NULL   
  2. R/utils.R line 110: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L110)
    dCounts[, n_wt := sum(lmInput$allele_count == 0)]   
  3. R/utils.R line 111: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L111)
    dCounts[, n_het := sum(lmInput$allele_count == 1)]   
  4. R/utils.R line 112: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L112)
    dCounts[, n_hom := sum(lmInput$allele_count == 2)]   
  5. R/utils.R line 117: Only use single-quotes. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L117)
    assertClass(coll, "AssertCollection")   

    To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

    
    filename,line_number,message,line
    R/utils.R,107,Variable and function name style should be camelCase.,n_het = n_hom = n_wt = NULL
    R/utils.R,110,Variable and function name style should be camelCase.,"dCounts[, n_wt := sum(lmInput$allele_count == 0)]"
    R/utils.R,111,Variable and function name style should be camelCase.,"dCounts[, n_het := sum(lmInput$allele_count == 1)]"
    R/utils.R,112,Variable and function name style should be camelCase.,"dCounts[, n_hom := sum(lmInput$allele_count == 2)]"
    R/utils.R,117,Only use single-quotes.,"assertClass(coll, ""AssertCollection"")"
Warning, lint_ignore.csv contains lines not found in the current code:  
R/genetic_association.R line 44: Variable and function name style should be camelCase. 
    ```r 
    diseaseId = disease_id = snp = allele_count = count = N = vid = NULL  

R/genetic_association.R line 127: Variable and function name style should be camelCase.

    ci_lower = melt = pval = se = ci_upper = allele_count = varName = n_het = n_hom =  

R/genetic_association.R line 128: Variable and function name style should be camelCase.

    n_total = n_wt = NULL  

R/genetic_association.R line 139: Variable and function name style should be camelCase.

    lmInput1[allele_count == 2, allele_count := 1]}  

R/genetic_association.R line 142: Variable and function name style should be camelCase.

    lmInput1[allele_count == 1, allele_count := 0]  

R/genetic_association.R line 143: Variable and function name style should be camelCase.

    lmInput1[allele_count == 2, allele_count := 1]}  

R/genetic_association.R line 146: Variable and function name style should be camelCase.

    lmInput1[, allele_count := as.factor(allele_count)]  

R/genetic_association.R line 162: Variable and function name style should be camelCase.

    glmStat[, ci_lower := ci[varName, 1]]  

R/genetic_association.R line 163: Variable and function name style should be camelCase.

    glmStat[, ci_upper := ci[varName, 2]]}  

R/phers.R line 32: Variable and function name style should be camelCase.

    flag = icd = person_id = . = NULL  

R/phers.R line 78: Variable and function name style should be camelCase.

    phecode = person_id = . = prev = w = NULL  

R/phers.R line 111: Variable and function name style should be camelCase.

    person_id = phecode = disease_id = w = score = . = NULL  

R/phers.R line 152: Variable and function name style should be camelCase.

    disease_id = diseaseId = resid_score = . = person_id = score = NULL  

R/positive_control.R line 22: Variable and function name style should be camelCase.

    dx_status = NULL  

R/positive_control.R line 35: Variable and function name style should be camelCase.

    cases[, dx_status := 1]  

R/positive_control.R line 40: Variable and function name style should be camelCase.

    dxStatus[is.na(dx_status), dx_status := 0]  

R/utils.R line 99: Variable and function name style should be camelCase.

    n_het = n_hom = n_wt = NULL  

R/utils.R line 102: Variable and function name style should be camelCase.

    dCounts[, n_wt := sum(lmInput$allele_count == 0)]  

R/utils.R line 103: Variable and function name style should be camelCase.

    dCounts[, n_het := sum(lmInput$allele_count == 1)]  

R/utils.R line 104: Variable and function name style should be camelCase.

    dCounts[, n_hom := sum(lmInput$allele_count == 2)]  

data-raw/phers_create_data.R line 80: Variable and function name style should be camelCase.

    IcdCodes = icdPhecodeMap[flag == flag1 & !(icd %in% diseaseDxIcdMap[disease_id == marfanId]$icd)]$icd