Skip to content

Commit

Permalink
added files and changed readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RAHenriksen committed Apr 8, 2024
1 parent 13ede6b commit 35958fd
Show file tree
Hide file tree
Showing 12 changed files with 855,092 additions and 11 deletions.
Binary file added Chr22_024_36_68_0097.sorted.MD.bam
Binary file not shown.
Binary file added Chr22_024_36_68_0097_eps10.sorted.MD.bam
Binary file not shown.
Binary file added Chr22_024_36_68_0097_eps10.sorted.MD.coord.bam
Binary file not shown.
Binary file not shown.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ git clone https://github.com/RAHenriksen/ngsBriggs.git

git clone https://github.com/samtools/htslib.git

cd htslib; make; cd ../NGSNGS; make HTSSRC=../htslib
cd htslib; make; cd ../ngsBriggs; make HTSSRC=../htslib

* Use systemwide installation of htslib

git clone https://github.com/RAHenriksen/ngsBriggs.git

cd NGSNGS; make
cd ngsBriggs; make

**NOTE:** Newer version of htslib which includes bam_set1 is required

Expand Down Expand Up @@ -47,6 +47,13 @@ Usage
-> -nthreads: Choose the number of threads to speed up the recalibration process.

Example
./ngsbriggs -bam /projects/korneliussen/people/wql443/NGSNGS/HgSimTest1.bam -ref /projects/korneliussen/people/wql443/NGSNGS/Test_Examples/Mycobacterium_leprae.fa.gz -model b

Inference of Briggs parameters

Inference of Briggs parameters with epsilon
./ngsbriggs -bam Chr22_024_36_68_0097_eps10.sorted.MD.bam -ref chr22.fa -eps 0.1 -model nb

Decontamination with epsilon
./ngsbriggs -bam Chr22_024_36_68_0097_eps10.sorted.MD.coord.bam -model nb -eps 0.1 -ibam Chr22_024_36_68_0097_eps10.sorted.MD.coord.bam -obam Chr22_024_36_68_0097_eps10.sorted.MD.scores.bam -isrecal 1 -ibed chr22.bed -chr chr22 -nthread 1

~~~~
1 change: 1 addition & 0 deletions chr22.bed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chr22 1 51304566
855,078 changes: 855,078 additions & 0 deletions chr22.fa

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions chr22.fa.fai
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chr22 51304566 7 60 61
4 changes: 2 additions & 2 deletions ngsBriggs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ int main(int argc, char **argv){

fprintf(stderr,"\nThe misincorporting matrix is as follows:\n");
fprintf(stderr,"Dir.\tPos.\tFreqCT\tFreqGA\n");
for (int i=0; i<MAXLENGTH;i++){
for (int i=0; i<5;i++){
fprintf(stderr,"5'\t%d\t",i+1);
fprintf(stderr,"%f\t%f\n",freqCT[i],freqGA[2*MAXLENGTH-1-i]);
}
for (int i=0; i<MAXLENGTH;i++){
for (int i=0; i<5;i++){
fprintf(stderr,"3'\t%d\t",i+1);
fprintf(stderr,"%f\t%f\n",freqCT[2*MAXLENGTH-1-i],freqGA[i]);
}
Expand Down
Binary file modified ngsbriggs
Binary file not shown.
5 changes: 0 additions & 5 deletions profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ void wrapper(const bam1_t *b,const char * reconstructedReference,const std::vect
}
}

int usage(FILE *fp,int val){
fprintf(stderr,"./metadamage pmd [options]\n");
return 0;
}

float **getmatrix(size_t x,size_t y){
float **ret = new float*[x];
for(int i=0;i<x;i++){
Expand Down
1 change: 0 additions & 1 deletion profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ typedef struct{
}mydata2;

void wrapper(const bam1_t *b,const char * reconstructedReference,const std::vector<int> & reconstructedReferencePos,const int & minQualBase, int MAXLENGTH,float **mm5p,float **mm3p,float incval,char myread[512],char myref[512]);
int usage(FILE *fp,int val);
std::map<int, mydataD> load_bdamage_full(const char* fname,int &printlength);
std::map<int, mydata2> load_lcastat(const char* fname);
void reconstructRefWithPosHTS(const bam1_t * b,std::pair< kstring_t *, std::vector<int> > &pp,char *reconstructedTemp);

0 comments on commit 35958fd

Please sign in to comment.