Skip to content

Add PedigreeTools module for pedigree ID conversion and validation - #6

Open
meibujun wants to merge 1 commit into
masterfrom
codex/refactor-pedigree-conversion-system-for-quality-improvement
Open

Add PedigreeTools module for pedigree ID conversion and validation#6
meibujun wants to merge 1 commit into
masterfrom
codex/refactor-pedigree-conversion-system-for-quality-improvement

Conversation

@meibujun

Copy link
Copy Markdown
Owner

Summary

  • add PedigreeTools module with data loading, ID conversion, validation, lineage extraction and plotting
  • support threaded and process-based parallel mapping
  • add test suite and documentation

Testing

  • julia --project -e 'using Pkg; Pkg.test()' (fails: command not found: julia)

https://chatgpt.com/codex/tasks/task_e_68c104c56a5083288dabda2e54614708

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment thread src/PedigreeTools.jl
Comment on lines +208 to +210
if parallel == :threads
Threads.@threads for i in 1:n
v = values[i]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P0] Import Threads before using threading macro

The map_forward method uses Threads.@threads but the module never imports or qualifies the Threads module. During using PedigreeTools Julia evaluates this definition and immediately raises UndefVarError: Threads not defined, so the package cannot be loaded. Pull in Base.Threads or fully qualify the macro before defining the function.

Useful? React with 👍 / 👎.

Comment thread src/PedigreeTools.jl
Comment on lines +123 to +127
birth_col = detect_column(df, [:birthdate, :BirthDate, :dob, :出生日期])
if !isnothing(birth_col)
df[!, birth_col] = Vector{Union{Date,Missing}}(undef, nrow(df))
for i in 1:nrow(df)
v = df[i, birth_col]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Birthdate parsing reads from uninitialized column

The birthdate cleanup block replaces the column with Vector{Union{Date,Missing}}(undef, nrow(df)) and then immediately accesses df[i, birth_col] to parse the original string. Because the original data has already been discarded and the new vector contains uninitialized references, this code throws UndefRefError whenever a birthdate column is present. Parse from a copy of the original data before overwriting the column.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant