- Notifications
You must be signed in to change notification settings - Fork23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Some changes onfinemapper.py
with data parsing, and if unnecessary, i'll only submit the code with bug fix for bgen file#188
Open
1511878618 wants to merge12 commits intoomerwe:masterChoose a base branch from1511878618:master
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
snp_alleles = rsid.alleles | ||
snp_chrom = rsid.chrom | ||
snp_pos = rsid.pos | ||
rsid = rsid.rsid # NOTE: this is the change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is the changes code only.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Title: Enhancements and New Features for Genetic Data Processing
Code only modified for
finemapper.py
Summary of Changes
This PR introduces several updates and new features to improve the handling and processing of genetic data. Key changes include:
Support for BGEN to cal LD and save to .npz Conversion to accelate the loading speed compared to .bcor:
--geno genofile --ldstore2 $(which ldstore) --cache-dir ./ --cache-format npz
to save in npz format by default.NPZ File Reading Capability:
--ld your_npz_prefix
.PGEN File Support:
--geno pgen_file_prefix
.finemap_tools
for invoking Plink2 (version must be later than PLINK v2.00a6LM 64-bit Intel, dated 2 Mar 2024) to compute LD, using the command template:plink2 --r2-unphased square
.--geno
option matches files using prefixes, with bed files having higher priority over pgen to avoid conflicts when both file types are present.Improvements in LD Matrix Handling:
sync_ld_sumstats
function to exclude SNPs with NA values.Enhancements in Summary Statistics (sumstats) Loading:
tabix
command-line tool. This approach is particularly efficient for genome-wide sumstats, allowing direct retrieval of data by chromosome, significantly reducing loading times.finemap_tools
is unavailable, the original logic of reading the entire file will be followed.tabix -s 2 -b 3 -e 3 -c S sumstats_with_bgz_compressed.bgz
.Integration of
finemap_tools
Package:finemap_tools
for filtering bialleic and ambiguous alleles during sumstats reading.Code Formatting Updates:
bgen bug fix
This is the commits :
03c283d2190e2f3100462bb8932ed4f7441b54aa
do, and after this commits is some more changes which may not necessary.Future Developments
Further development and updates will continue in my own repository and will not be submitted as pull requests to this project.