Skip to content

Commit

Permalink
remove ssw and no C code exist any more
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhixing Feng authored and Zhixing Feng committed Feb 19, 2020
1 parent 1080f00 commit 742ff07
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 2,208 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
PREFIX = .
CXX = g++
CC = gcc
INCLUDES = -I include -I tools/boost/include -I tools -I tools/seqan/seqan/include
CXX_FLAGS = -pthread -std=c++14 -w -O2 -lz

Expand Down Expand Up @@ -37,8 +36,6 @@ igda: $(OBJ_CXX) $(OBJ_C)
%.o: %.cpp
$(CXX) $(INCLUDES) -c $< -o $@ $(CXX_FLAGS)

%.o: %.c
$(CC) $(INCLUDES) -c $< -o $@
rmobj:
rm -f $(OBJ_CXX)

Expand Down
38 changes: 0 additions & 38 deletions iGDA.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
DC2A188C1F55E257001830AE /* test_assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC2A188A1F55E257001830AE /* test_assembler.cpp */; };
DC42264B23327D9300A34C49 /* cmpreads_multithread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC42264A23327D9300A34C49 /* cmpreads_multithread.cpp */; };
DC5083BA1F015AB300063BEA /* dforestsnvmax.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC5083B81F015AB300063BEA /* dforestsnvmax.cpp */; };
DC516C041FCDE4C500D324DB /* ssw.c in Sources */ = {isa = PBXBuildFile; fileRef = DC516C001FCDE4C500D324DB /* ssw.c */; };
DC516C051FCDE4C500D324DB /* ssw_cpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC516C021FCDE4C500D324DB /* ssw_cpp.cpp */; };
DC516C071FCDE8E800D324DB /* test_ssw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC516C061FCDE8E800D324DB /* test_ssw.cpp */; };
DC516C0B1FCF04DD00D324DB /* alignment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC516C091FCF04DD00D324DB /* alignment.cpp */; };
DC8562701E9C04B5005AE6EB /* errormodel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC85626E1E9C04B5005AE6EB /* errormodel.cpp */; };
DC8562731E9C1A5F005AE6EB /* errormodelsnv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC8562711E9C1A5F005AE6EB /* errormodelsnv.cpp */; };
DC8562751E9C1F47005AE6EB /* test_errormodel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DC8562741E9C1F47005AE6EB /* test_errormodel.cpp */; };
Expand Down Expand Up @@ -81,13 +77,6 @@
DC42264A23327D9300A34C49 /* cmpreads_multithread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = cmpreads_multithread.cpp; sourceTree = "<group>"; };
DC5083B81F015AB300063BEA /* dforestsnvmax.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dforestsnvmax.cpp; sourceTree = "<group>"; };
DC5083B91F015AB300063BEA /* dforestsnvmax.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dforestsnvmax.h; sourceTree = "<group>"; };
DC516C001FCDE4C500D324DB /* ssw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ssw.c; sourceTree = "<group>"; };
DC516C011FCDE4C500D324DB /* ssw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ssw.h; sourceTree = "<group>"; };
DC516C021FCDE4C500D324DB /* ssw_cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ssw_cpp.cpp; sourceTree = "<group>"; };
DC516C031FCDE4C500D324DB /* ssw_cpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ssw_cpp.h; sourceTree = "<group>"; };
DC516C061FCDE8E800D324DB /* test_ssw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_ssw.cpp; sourceTree = "<group>"; };
DC516C091FCF04DD00D324DB /* alignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = alignment.cpp; sourceTree = "<group>"; };
DC516C0A1FCF04DD00D324DB /* alignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = alignment.h; sourceTree = "<group>"; };
DC5829802052E361001BFE6D /* uninstall.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = uninstall.sh; sourceTree = "<group>"; };
DC7018CB1D809C6200890781 /* cmpreads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cmpreads.h; sourceTree = "<group>"; };
DC7018CC1D8110F600890781 /* khash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = khash.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4322,26 +4311,6 @@
path = assemble;
sourceTree = "<group>";
};
DC516BFF1FCDE4C500D324DB /* ssw */ = {
isa = PBXGroup;
children = (
DC516C001FCDE4C500D324DB /* ssw.c */,
DC516C011FCDE4C500D324DB /* ssw.h */,
DC516C021FCDE4C500D324DB /* ssw_cpp.cpp */,
DC516C031FCDE4C500D324DB /* ssw_cpp.h */,
);
path = ssw;
sourceTree = "<group>";
};
DC516C081FCF04B700D324DB /* alignment */ = {
isa = PBXGroup;
children = (
DC516C091FCF04DD00D324DB /* alignment.cpp */,
DC516C0A1FCF04DD00D324DB /* alignment.h */,
);
path = alignment;
sourceTree = "<group>";
};
DC85626D1E9BFCA5005AE6EB /* errormodel */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4404,7 +4373,6 @@
children = (
DCE21D0522E605B3000D557F /* rsm */,
DC15903120EE9BDD0050869D /* detectsingle */,
DC516C081FCF04B700D324DB /* alignment */,
DC2A18861F55E212001830AE /* assemble */,
DC85626D1E9BFCA5005AE6EB /* errormodel */,
DC95DCBE1DF0A0C4004282DF /* dforest */,
Expand Down Expand Up @@ -4451,7 +4419,6 @@
DC8562741E9C1F47005AE6EB /* test_errormodel.cpp */,
DC2A188A1F55E257001830AE /* test_assembler.cpp */,
DCD493961FB4BD1F0011F28B /* test_pcg.cpp */,
DC516C061FCDE8E800D324DB /* test_ssw.cpp */,
DCE2FA161FE184BD00E629D0 /* test_stxxl.cpp */,
DCF0947220B9F602004554CA /* test_dforeststxxl.cpp */,
DC15903820EEA1170050869D /* test_detectsingle.cpp */,
Expand All @@ -4468,7 +4435,6 @@
children = (
DC15933220EEC4FC0050869D /* prob */,
DCE2FA191FE1A75600E629D0 /* kseq.h */,
DC516BFF1FCDE4C500D324DB /* ssw */,
DCD493921FB4BCC20011F28B /* pcg */,
DC7018CC1D8110F600890781 /* khash.h */,
DC930F381D5527CF00640B65 /* boost */,
Expand Down Expand Up @@ -11688,7 +11654,6 @@
buildActionMask = 2147483647;
files = (
DCE2FA171FE184BD00E629D0 /* test_stxxl.cpp in Sources */,
DC516C0B1FCF04DD00D324DB /* alignment.cpp in Sources */,
DCF4892D1DE53C6300E5E88D /* test_performance.cpp in Sources */,
DC15903420EE9BEF0050869D /* detectsingle.cpp in Sources */,
DCF2E09223E0E3EE00DC2D98 /* permute_reads.cpp in Sources */,
Expand All @@ -11700,10 +11665,8 @@
DC15903720EEA0ED0050869D /* detectsinglesnv.cpp in Sources */,
DC2A18891F55E22B001830AE /* assembler.cpp in Sources */,
DC9318491D5527D200640B65 /* main.cpp in Sources */,
DC516C051FCDE4C500D324DB /* ssw_cpp.cpp in Sources */,
DC8562751E9C1F47005AE6EB /* test_errormodel.cpp in Sources */,
DCAF850D2187851A00C757AE /* test_graph.cpp in Sources */,
DC516C071FCDE8E800D324DB /* test_ssw.cpp in Sources */,
DC93184C1D5527D200640B65 /* alignreader.cpp in Sources */,
DC229D9620E6CF8300EA6ADB /* alignreadersam.cpp in Sources */,
DCE21D0A22E61060000D557F /* test_rsm.cpp in Sources */,
Expand All @@ -11722,7 +11685,6 @@
DC5083BA1F015AB300063BEA /* dforestsnvmax.cpp in Sources */,
DC15933520EEC4FC0050869D /* prob.cpp in Sources */,
DC42264B23327D9300A34C49 /* cmpreads_multithread.cpp in Sources */,
DC516C041FCDE4C500D324DB /* ssw.c in Sources */,
DCFEC5971D5BD12B0025E57C /* test_misc.cpp in Sources */,
DC93184E1D5527D200640B65 /* test_AlignCoder.cpp in Sources */,
DCF0947320B9F602004554CA /* test_dforeststxxl.cpp in Sources */,
Expand Down
Binary file not shown.
50 changes: 0 additions & 50 deletions src/modules/aligncoder/aligncodersnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,56 +125,6 @@ int AlignCoderSNV::binary_code(int pos, char base)
return 4*pos + shift;
}

bool AlignCoderSNV::encode(const StripedSmithWaterman::Alignment &alignment, const string &read, const string &ref,
int start_pos, vector<int> &encode_data)
{
// scan cigar to encode the variants (only work for positive strand !!)
int read_pos = alignment.query_begin;
int ref_pos = alignment.ref_begin;
for (int i=0; i<(int)alignment.cigar.size(); ++i){
// parse cigar (high 28 bits: length, low 4 bits: M/I/D/S/X (0/1/2/4/8)), = is 7
uint32_t cigar_type = alignment.cigar[i] & 0xF;
uint32_t cigar_len = alignment.cigar[i] >> 4;

switch(cigar_type){
// if cigar_type is M, shift read_pos and ref_pos
case 0:
read_pos += cigar_len;
ref_pos += cigar_len;
break;
// if cigar_type is I, shift read_pos
case 1:
read_pos += cigar_len;
break;
// if cigar_type is D, shift ref_pos
case 2:
ref_pos += cigar_len;
break;
// if cigar_type is S, do nothing
case 4:
break;
// if cigar_type is =, shift read_pos and ref_pos
case 7:
read_pos += cigar_len;
ref_pos += cigar_len;
break;

// if cigar_type is X, encode the variant and shift read_pos and ref_pos
case 8:
for (int j=0; j<(int)cigar_len; ++j){
encode_data.push_back(binary_code(start_pos + ref_pos + j, read[read_pos+j]));
}
read_pos += cigar_len;
ref_pos += cigar_len;
break;
default:
throw runtime_error("unknow cigar type.");
break;

}
}
return true;
}


bool AlignCoderSNV::recode_legacy(string m5_file, string var_file, string recode_file, int left_len, int right_len, bool is_report_ref)
Expand Down
4 changes: 0 additions & 4 deletions src/modules/aligncoder/aligncodersnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ class AlignCoderSNV : public AlignCoder
// code formula: shift is A=+0, C=+1, G=+2, T=+3, code=4*(pos-1) + shift
int binary_code(int pos, char base);

// encode alignment result of ssw, start_pos is 0-based !
bool encode(const StripedSmithWaterman::Alignment &alignment, const string &read, const string &ref,
int start_pos, vector<int> &encode_data);

// recode according to detected variants
bool recode_legacy(string m5_file, string var_file, string recode_file, int left_len, int right_len, bool is_report_ref = true);
bool recode(string m5_file, string var_file, string recode_file, int left_len, int right_len, bool is_report_ref = true);
Expand Down
11 changes: 0 additions & 11 deletions src/modules/alignment/alignment.cpp

This file was deleted.

39 changes: 0 additions & 39 deletions src/modules/alignment/alignment.h

This file was deleted.

1 change: 0 additions & 1 deletion src/modules/assemble/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "../../../include/headers.h"
#include "../../misc/misc.h"
#include "../aligncoder/aligncodersnv.h"
#include "../src/modules/alignment/alignment.h"
#include "../src/modules/dforest/dforestsnvmax.h"

struct CmpreadsDiff
Expand Down
Loading

0 comments on commit 742ff07

Please sign in to comment.