Skip to content

sumstats.py mat output .mat files show zero overlapping SNPs in downstream analysis, fixed by reformatting CSV with write.table #57

@YaxinL

Description

@YaxinL

I followed the recommended data preparation steps:
txt file → txt.gz file → csv file (with added Z-score) → mat file.

I ran: python sumstats.py mat --sumstats trait.csv --ref 9545380.ref --out trait.mat

The log showed:6468852 SNPs matched with reference file
Writing .mat file...

The results were similar for both traits.

However, when running the conjunctional FDR analysis in MATLAB:matlab -nodisplay -nosplash < runme.m
It reported 0 overlapping variants between the two .mat files, which is unexpected.

I read the original txt file in R and rewrote the formatted file using:write.table(trait, 'trait.csv', sep = '\t', quote = FALSE, row.names = FALSE)

After re-running:python sumstats.py mat --sumstats trait.csv --ref 9545380.ref --out trait.mat

The conjunctional FDR MATLAB code successfully detected overlapping SNPs and worked as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions