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
#include <zlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include "kseq.h" | |
#include "khash.h" | |
KSEQ_INIT(gzFile, gzread); | |
KHASH_SET_INIT_STR(s) | |
#define BUF_SIZE 2048 |
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
#include <Rcpp.h> | |
using namespace Rcpp; | |
// [[Rcpp::export]] | |
NumericVector removeNA(NumericVector a) | |
{ | |
int vectorLength = a.size(); | |
NumericVector result(vectorLength); | |
for (int i = 0; i < vectorLength ; i++) |
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
#include <Rcpp.h> | |
using namespace Rcpp; | |
// [[Rcpp::export]] | |
NumericVector bubbleSort(NumericVector a){ | |
//sorting a numeric vector in to a ascending list// | |
int j, flag, vectorSize = a.size(); | |
double tempVal; | |
NumericVector sortedVector(clone(a)); | |
NumericVector finalIndex(vectorSize); |
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
#include <Rcpp.h> | |
#include <stdlib.h> | |
using namespace Rcpp; | |
using namespace std; | |
// define pairs | |
typedef pair<double,int> pairType; | |
// define method for sorting |
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
#include <Rcpp.h> | |
#include <sstream> | |
#include <string> | |
#include <vector> | |
using namespace Rcpp; | |
using namespace std; | |
typedef vector<string> stringList; | |
typedef vector<int> numList; |
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
{% include comments.html %} |
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
<div id="disqus_thread"></div> | |
<script type="text/javascript"> | |
/* * * CONFIGURATION VARIABLES * * */ | |
var disqus_shortname = 'douglaswu'; | |
/* * * DON'T EDIT BELOW THIS LINE * * */ | |
(function() { | |
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | |
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; | |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); |
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
#include <glob.h> | |
#include <iostream> | |
#include <fstream> | |
#include <gzstream.h> | |
#include <sstream> | |
#include <stdlib.h> | |
#include <string> | |
#include <vector> | |
#include <libgen.h> | |
#include <string.h> |
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
#include <Rcpp.h> | |
using namespace Rcpp; | |
double getProb(double p, int success, int fail){ | |
double e = success * log(p) + fail * log(1-p); | |
return e; | |
} | |
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
#include <iostream> | |
#include <sstream> | |
#include <fstream> | |
#include <string> | |
#include <vector> | |
#include <cassert> | |
#include <iomanip> | |
#include <cstring> | |
#include <map> |
OlderNewer