| 1 |
#ifndef __PLINK2_EXPORT_H__ |
| 2 |
#define __PLINK2_EXPORT_H__ |
| 3 |
|
| 4 |
// This file is part of PLINK 2.0, copyright (C) 2005-2025 Shaun Purcell, |
| 5 |
// Christopher Chang. |
| 6 |
// |
| 7 |
// This program is free software: you can redistribute it and/or modify it |
| 8 |
// under the terms of the GNU General Public License as published by the Free |
| 9 |
// Software Foundation, either version 3 of the License, or (at your option) |
| 10 |
// any later version. |
| 11 |
// |
| 12 |
// This program is distributed in the hope that it will be useful, but WITHOUT |
| 13 |
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 14 |
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 15 |
// more details. |
| 16 |
// |
| 17 |
// You should have received a copy of the GNU General Public License |
| 18 |
// along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
|
| 21 |
#include "plink2_data.h" |
| 22 |
|
| 23 |
#ifdef __cplusplus |
| 24 |
namespace plink2 { |
| 25 |
#endif |
| 26 |
|
| 27 |
ENUM_U31_DEF_START() |
| 28 |
kVcfExport0, |
| 29 |
kVcfExportGp, |
| 30 |
kVcfExportDs, |
| 31 |
kVcfExportDsForce, |
| 32 |
kVcfExportDsOnly, |
| 33 |
kVcfExportHds, |
| 34 |
kVcfExportHdsForce |
| 35 |
ENUM_U31_DEF_END(VcfExportMode); |
| 36 |
|
| 37 |
FLAGSET_DEF_START() |
| 38 |
kfIdpaste0, |
| 39 |
kfIdpasteMaybefid = (1 << 0), |
| 40 |
kfIdpasteFid = (1 << 1), |
| 41 |
kfIdpasteIid = (1 << 2), |
| 42 |
kfIdpasteMaybesid = (1 << 3), |
| 43 |
kfIdpasteSid = (1 << 4), |
| 44 |
kfIdpasteDefault = (kfIdpasteMaybefid | kfIdpasteIid | kfIdpasteMaybesid) |
| 45 |
FLAGSET_DEF_END(IdpasteFlags); |
| 46 |
|
| 47 |
typedef struct ExportfStruct { |
| 48 |
ExportfFlags flags; |
| 49 |
IdpasteFlags idpaste_flags; |
| 50 |
char id_delim; |
| 51 |
uint32_t bgen_bits; |
| 52 |
VcfExportMode vcf_mode; |
| 53 |
char* export_allele_fname; |
| 54 |
} ExportfInfo; |
| 55 |
|
| 56 |
void InitExportf(ExportfInfo* exportf_info_ptr); |
| 57 |
|
| 58 |
void CleanupExportf(ExportfInfo* exportf_info_ptr); |
| 59 |
|
| 60 |
PglErr Exportf(const uintptr_t* sample_include, const PedigreeIdInfo* piip, const uintptr_t* sex_nm, const uintptr_t* sex_male, const PhenoCol* pheno_cols, const char* pheno_names, const uintptr_t* variant_include, const ChrInfo* cip, const uint32_t* variant_bps, const char* const* variant_ids, const uintptr_t* allele_idx_offsets, const char* const* allele_storage, const AlleleCode* allele_permute, const uintptr_t* pvar_qual_present, const float* pvar_quals, const uintptr_t* pvar_filter_present, const uintptr_t* pvar_filter_npass, const char* const* pvar_filter_storage, const char* pvar_info_reload, const double* variant_cms, const ExportfInfo* eip, const char* legacy_output_missing_pheno, const uint32_t* contig_lens, uintptr_t xheader_blen, InfoFlags info_flags, uint32_t raw_sample_ct, uint32_t sample_ct, uint32_t pheno_ct, uintptr_t max_pheno_name_blen, uint32_t raw_variant_ct, uint32_t variant_ct, uint32_t max_variant_id_slen, uint32_t max_allele_slen, uint32_t max_filter_slen, uint32_t info_reload_slen, char input_missing_geno_char, char output_missing_geno_char, char legacy_output_missing_geno_char, uint32_t max_thread_ct, MakePlink2Flags make_plink2_flags, uintptr_t pgr_alloc_cacheline_ct, char* xheader, PgenFileInfo* pgfip, PgenReader* simple_pgrp, char* outname, char* outname_end); |
| 61 |
|
| 62 |
#ifdef __cplusplus |
| 63 |
} // namespace plink2 |
| 64 |
#endif |
| 65 |
|
| 66 |
#endif // __PLINK2_EXPORT_H__ |