Skip to content

[ENH] First take at a citation system#146

Merged
arokem merged 5 commits into
tractometry:mainfrom
36000:citation_system
Jan 16, 2026
Merged

[ENH] First take at a citation system#146
arokem merged 5 commits into
tractometry:mainfrom
36000:citation_system

Conversation

@36000

@36000 36000 commented Jan 13, 2026

Copy link
Copy Markdown
Collaborator

Closes #98

Copilot AI review requested due to automatic review settings January 13, 2026 00:57
@36000 36000 added this to the pyAFQ 3.0 milestone Jan 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements a citation export system for pyAFQ that automatically tracks and exports BibTeX citations for methods used in tractography analyses. The system collects citations as the analysis pipeline executes and exports them to a .bib file.

Changes:

  • Added a citation collection and export mechanism that writes BibTeX files
  • Integrated citations into task functions across data processing, tractography, tissue analysis, structural segmentation, and mapping modules
  • Added citations to bundle dictionaries for tract-specific references
  • Updated example tutorials to demonstrate the citation export feature

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
AFQ/tasks/viz.py Added citations export function with BibTeX file writing and deduplication
AFQ/tasks/tractography.py Added citations for tractography methods (PFT, ACT)
AFQ/tasks/tissue.py Added citations for MSMT-CSD and unified filtering
AFQ/tasks/structural.py Added citations for neural network segmentation models (SynthSeg, Multi-axial, Brainchop, MindGrab)
AFQ/tasks/mapping.py Added citation for SLR registration
AFQ/tasks/data.py Added citations for various reconstruction models (DTI, fwDTI, DKI, MSDKI, CSD, GQI, RUMBA, OPDT, CSA)
AFQ/api/bundle_dict.py Extended BundleDict class to support citations; added citations to default, SLF, baby, RecoBundles, cerebellar, and OR bundle definitions
AFQ/api/participant.py Initialized citations set with core pyAFQ and DIPY references
AFQ/api/utils.py Added citation export to export_all_helper function
examples/tutorial_examples/plot_002_participant_afq_api.py Added section demonstrating citation export
examples/tutorial_examples/plot_001_group_afq_api.py Added section demonstrating citation export
docs/source/references.bib Updated author names from LaTeX encoding to Unicode characters
.codespellrc Added citation-related terms to ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AFQ/tasks/viz.py
Comment thread AFQ/tasks/viz.py
Comment thread AFQ/tasks/viz.py
Comment thread AFQ/api/participant.py Outdated
Comment thread examples/tutorial_examples/plot_002_participant_afq_api.py Outdated
Comment thread examples/tutorial_examples/plot_001_group_afq_api.py Outdated
@36000

36000 commented Jan 13, 2026

Copy link
Copy Markdown
Collaborator Author

@arokem this is ready for review

@arokem

arokem commented Jan 15, 2026

Copy link
Copy Markdown
Member

Overall, I like the idea. I wonder if it would be possible to have all the bibtex of the citations in one place, instead of spread all over the code-base like this. Maybe a module that defines one big dictionary with citations in it? I also wonder if this could somehow be automated a bit more to turn a raw .bib file into this dict. Maybe the keys could automatically be generated as "AuthorYearJournal" or something like that?

@arokem

arokem commented Jan 15, 2026

Copy link
Copy Markdown
Member

Or I guess the bibtex keys could be used. I wonder if there is some machinery from https://sphinxcontrib-bibtex.readthedocs.io/en/latest/usage.html that could be reused here.

@arokem

arokem commented Jan 15, 2026

Copy link
Copy Markdown
Member

Or something like this? https://pypi.org/project/bibtexparser/

@36000

36000 commented Jan 15, 2026

Copy link
Copy Markdown
Collaborator Author

I am inclined to not add an additional dependency for this. Maybe we could have one python file which is a large dict of references, then in each function we append keys to citations, and when we export we reference the dict. that would keep the code a little cleaner.

@arokem

arokem commented Jan 15, 2026

Copy link
Copy Markdown
Member

Don't forget to add the new scilpy paper (https://apertureneuro.org/article/154022-tractography-analysis-with-the-scilpy-toolbox) as a reference for the aODFs.

@36000

36000 commented Jan 16, 2026

Copy link
Copy Markdown
Collaborator Author

@arokem I implemented the recommended changes. I also now copy over the references.bib file from docs to AFQ during the build so it will pip install well. I think this is ready to merge, does it look good?

@arokem

arokem commented Jan 16, 2026

Copy link
Copy Markdown
Member

Yes, looks good! In the long run we could produce more detailed "boiler-plate" text for users to include in their papers, which would incorporate these citations. Along the lines of what qsiprep/qsirecon does.

@arokem
arokem merged commit 7a8982b into tractometry:main Jan 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Citation system

3 participants