hugheylab / phers

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

lintr found issues with code #45

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago
  1. R/genetic_association.R line 44: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L44)
    diseaseId = disease_id = snp = allele_count = count = N = vid = NULL 
  2. R/genetic_association.R line 127: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L127)
    ci_lower = melt = pval = se = ci_upper = allele_count = varName = n_het = n_hom = 
  3. R/genetic_association.R line 128: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L128)
    n_total = n_wt = NULL 
  4. R/genetic_association.R line 139: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L139)
    lmInput1[allele_count == 2, allele_count := 1]} 
  5. R/genetic_association.R line 142: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L142)
    lmInput1[allele_count == 1, allele_count := 0] 
  6. R/genetic_association.R line 143: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L143)
    lmInput1[allele_count == 2, allele_count := 1]} 
  7. R/genetic_association.R line 146: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L146)
    lmInput1[, allele_count := as.factor(allele_count)] 
  8. R/genetic_association.R line 162: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L162)
    glmStat[, ci_lower := ci[varName, 1]] 
  9. R/genetic_association.R line 163: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L163)
    glmStat[, ci_upper := ci[varName, 2]]} 
  10. R/phers.R line 32: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L32)
    flag = icd = person_id = . = NULL 
  11. R/phers.R line 78: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L78)
    phecode = person_id = . = prev = w = NULL 
  12. R/phers.R line 111: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L111)
    person_id = phecode = disease_id = w = score = . = NULL 
  13. R/phers.R line 152: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L152)
    disease_id = diseaseId = resid_score = . = person_id = score = NULL 
  14. R/positive_control.R line 22: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L22)
    dx_status = NULL 
  15. R/positive_control.R line 35: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L35)
    cases[, dx_status := 'case'] 
  16. R/positive_control.R line 40: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L40)
    dxStatus[is.na(dx_status), dx_status := 'control'] 
  17. R/utils.R line 99: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L99)
    n_het = n_hom = n_wt = NULL 
  18. R/utils.R line 102: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L102)
    dCounts[, n_wt := sum(lmInput$allele_count == 0)] 
  19. R/utils.R line 103: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L103)
    dCounts[, n_het := sum(lmInput$allele_count == 1)] 
  20. R/utils.R line 104: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L104)
    dCounts[, n_hom := sum(lmInput$allele_count == 2)] 
  21. data-raw/phers_create_data.R line 80: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/data-raw/phers_create_data.R#L80)
    IcdCodes = icdPhecodeMap[flag == flag1 & !(icd %in% diseaseDxIcdMap[disease_id == marfanId]$icd)]$icd 

    If you want to exclude these style issues from being counted, save the following as lint_exclude.csv in the repository:

    
    filename,line_number,message,line
    R/genetic_association.R,44,Variable and function name style should be camelCase.,diseaseId = disease_id = snp = allele_count = count = N = vid = NULL
    R/genetic_association.R,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,128,Variable and function name style should be camelCase.,n_total = n_wt = NULL
    R/genetic_association.R,139,Variable and function name style should be camelCase.,"lmInput1[allele_count == 2, allele_count := 1]}"
    R/genetic_association.R,142,Variable and function name style should be camelCase.,"lmInput1[allele_count == 1, allele_count := 0]"
    R/genetic_association.R,143,Variable and function name style should be camelCase.,"lmInput1[allele_count == 2, allele_count := 1]}"
    R/genetic_association.R,146,Variable and function name style should be camelCase.,"lmInput1[, allele_count := as.factor(allele_count)]"
    R/genetic_association.R,162,Variable and function name style should be camelCase.,"glmStat[, ci_lower := ci[varName, 1]]"
    R/genetic_association.R,163,Variable and function name style should be camelCase.,"glmStat[, ci_upper := ci[varName, 2]]}"
    R/phers.R,32,Variable and function name style should be camelCase.,flag = icd = person_id = . = NULL
    R/phers.R,78,Variable and function name style should be camelCase.,phecode = person_id = . = prev = w = NULL
    R/phers.R,111,Variable and function name style should be camelCase.,person_id = phecode = disease_id = w = score = . = NULL
    R/phers.R,152,Variable and function name style should be camelCase.,disease_id = diseaseId = resid_score = . = person_id = score = NULL
    R/positive_control.R,22,Variable and function name style should be camelCase.,dx_status = NULL
    R/positive_control.R,35,Variable and function name style should be camelCase.,"cases[, dx_status := 'case']"
    R/positive_control.R,40,Variable and function name style should be camelCase.,"dxStatus[is.na(dx_status), dx_status := 'control']"
    R/utils.R,99,Variable and function name style should be camelCase.,n_het = n_hom = n_wt = NULL
    R/utils.R,102,Variable and function name style should be camelCase.,"dCounts[, n_wt := sum(lmInput$allele_count == 0)]"
    R/utils.R,103,Variable and function name style should be camelCase.,"dCounts[, n_het := sum(lmInput$allele_count == 1)]"
    R/utils.R,104,Variable and function name style should be camelCase.,"dCounts[, n_hom := sum(lmInput$allele_count == 2)]"
    data-raw/phers_create_data.R,80,Variable and function name style should be camelCase.,IcdCodes = icdPhecodeMap[flag == flag1 & !(icd %in% diseaseDxIcdMap[disease_id == marfanId]$icd)]$icd