Skip to content

Commit

Permalink
clean import
Browse files Browse the repository at this point in the history
  • Loading branch information
zqfang committed Aug 14, 2024
1 parent b80056c commit 562be52
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 57 deletions.
4 changes: 2 additions & 2 deletions haplomap/include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Created by Zhuoqing Fang on 8/13/24.
//
// #pragma once
#ifndef CONFIG_H
#define CONFIG_H
#ifndef CONSTANTS_H
#define CONSTANTS_H

#include <string>
#include <unordered_map>
Expand Down
6 changes: 3 additions & 3 deletions haplomap/include/eigen.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Created by Zhuoqing Fang on 7/8/20.
//

#ifndef HBCGM_EIGEN_H
#define HBCGM_EIGEN_H
#ifndef EIGEN_H
#define EIGEN_H
#include <vector>
#include <string>
#include "dynum.h"
Expand Down Expand Up @@ -38,4 +38,4 @@ struct EigenMat
gsl_matrix* pca(unsigned int L);
};

#endif //HBCGM_EIGEN_H
#endif // EIGEN_H
4 changes: 3 additions & 1 deletion haplomap/include/haplolib.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// -*-c++-*-

#ifndef HAPLOLIB_H
#define HAPLOLIB_H
// Various useful functions from nhaploblocks
//#pragma once
#include <fstream>
Expand Down Expand Up @@ -185,3 +186,4 @@ extern Dynum<std::string> chromosomes;
// vector of all good SNPs in order of chromosome, position.
extern std::vector<SNPInfo *> snpVec;

#endif
6 changes: 3 additions & 3 deletions haplomap/include/haplomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Created by Zhuoqing Fang on 7/11/20.
//
#pragma once
#ifndef HBCGM_HAPLOMAP_H
#define HBCGM_HAPLOMAP_H
#ifndef HAPLOMAP_H
#define HAPLOMAP_H

#include <getopt.h>
#include <cstring>
Expand All @@ -23,4 +23,4 @@ int main_ghmap(int argc, char **argv);
/// genetic relation matrix, see pca.cpp
int main_eigen(int argc, char **argv);

#endif //HBCGM_HAPLOMAP_H
#endif // HAPLOMAP_H
6 changes: 3 additions & 3 deletions haplomap/include/linalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Created by Zhuoqing Fang on 7/8/20.
//

#ifndef HBCGM_LINALG_H
#define HBCGM_LINALG_H
#ifndef LINALG_H
#define LINALG_H
#include <vector>
#include <assert.h>

Expand Down Expand Up @@ -66,4 +66,4 @@ std::vector<size_t> argsort(_RAIter first, _RAIter last, _Compare comp) {



#endif //HBCGM_LINALG_H
#endif // LINALG_H
6 changes: 3 additions & 3 deletions haplomap/include/stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Created by Zhuoqing Fang on 7/6/20.
//

#ifndef HBCGM_STATS_H
#define HBCGM_STATS_H
#ifndef STATS_H
#define STATS_H

#include <iostream>
#include <vector>
Expand Down Expand Up @@ -185,4 +185,4 @@ std::vector<bool> bh_fdr(std::vector<_NumericType>& pval, std::vector<_NumericTy
*/
void bh_fdr(std::vector<BlockSummary *> & pval, float alpha=0.05, bool flag = 1);

#endif //HBCGM_STATS_H
#endif //STATS_H
6 changes: 5 additions & 1 deletion haplomap/include/vcf.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//
// Created by Zhuoqing Fang on 2/22/21.
//
#ifndef VCF_H
#define VCF_H

#include <memory>
#include <iostream>
Expand Down Expand Up @@ -111,4 +113,6 @@ class VCF
// read input file
std::istream* input;
VCFOptions* opts;
};
};

#endif
6 changes: 5 additions & 1 deletion haplomap/include/vep.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// A deletion is indicated by the exact nucleotide coordinates. For example, a three base pair deletion of nucleotides 12600, 12601, and 12602 of the reverse strand will have start and end coordinates of :
// 12600 12602
// see here: https://useast.ensembl.org/info/genome/variation/prediction/classification.html#classes
#ifndef VEP_H
#define VEP_H

#include <memory>
#include <iostream>
Expand Down Expand Up @@ -105,4 +107,6 @@ class VarirantEeffectPredictor
void writeVEPImpact(char* outFileName);
void writeVEPCsq(char* outFileName);
bool getline(std::string &);
};
};

#endif
41 changes: 2 additions & 39 deletions haplomap/src/ghmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,8 @@ std::vector<BlockSummary *> blocks; // global vector of al
std::vector<std::string> geneExprHeader;
int traceFStat = false;

// std::unordered_map<std::string, int> PRIOR = {{"HIGH", 2}, {"MODERATE", 1}, {"LOW", 0}, {"MODIFIER", -1}};
// std::unordered_map<std::string, int> CSQs = {
// {"transcript_ablation", 2},
// {"splice_acceptor_variant", 2},
// {"splice_donor_variant", 2},
// {"stop_gained", 2},
// {"frameshift_variant", 2},
// {"stop_lost", 2},
// {"start_lost", 2},
// {"transcript_amplification", 2},
// {"inframe_insertion", 1},
// {"inframe_deletion", 1},
// {"missense_variant", 1},
// {"protein_altering_variant", 1},
// {"splice_region_variant", 0},
// {"incomplete_terminal_codon_variant", 0},
// {"start_retained_variant", 0},
// {"stop_retained_variant", 0},
// {"synonymous_variant", 0},
// {"coding_sequence_variant", -1},
// {"mature_miRNA_variant", -1},
// {"5_prime_UTR_variant", -1},
// {"3_prime_UTR_variant", -1},
// {"non_coding_transcript_exon_variant", -1},
// {"intron_variant", -1},
// {"NMD_transcript_variant", -1},
// {"non_coding_transcript_variant", -1},
// {"upstream_gene_variant", -1},
// {"downstream_gene_variant", -1},
// {"TFBS_ablation", -1},
// {"TFBS_amplification", -1},
// {"TF_binding_site_variant", -1},
// {"regulatory_region_ablation", -1},
// {"regulatory_region_amplification", -1},
// {"feature_elongation", -1},
// {"regulatory_region_variant", -1},
// {"feature_truncation", -1},
// {"intergenic_variant", -1},
// };
// std::unordered_map<std::string, int> PRIOR // from constants.h;
// std::unordered_map<std::string, int> CSQs // from constants.h

// constructor
BlockSummary::BlockSummary(const char *chrnm, int num, int start, int size,
Expand Down
2 changes: 1 addition & 1 deletion haplomap/src/vep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ void VarirantEeffectPredictor::readVEP(char *inVEPName, char *delemiter, char* v
}
std::string VarirantEeffectPredictor::codonChange(VEPSummary * pRecord)
{ // aggregate all condon changes groupby (location, transcript)
std::string _expr = "";
std::string _expr;
for (int j = 0; j < pRecord->codons.size(); j++)
{
std::string codon = pRecord->codons.eltOf(j);
Expand Down

0 comments on commit 562be52

Please sign in to comment.