Skip to content

Commit 728a094

Browse files
author
何伟明(Weiming He)
committed
code
1 parent 1b7f828 commit 728a094

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+30168
-29
lines changed

BamDeal.cpp

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#include <iostream>
2+
#include <fstream>
3+
#include <sstream>
4+
#include <string>
5+
#include <cstdlib>
6+
#include <stdio.h>
7+
#include <string.h>
8+
#include <zlib.h>
9+
#include "src/convert/covert.h"
10+
#include "src/modify/modify.h"
11+
#include "src/statistics/statistics.h"
12+
#include "src/visualize/visualize.h"
13+
14+
using namespace std;
15+
16+
int convert_main(int argc, char *argv[]) ;
17+
int modify_main(int argc, char *argv[]);
18+
int statistics_main(int argc, char *argv[]);
19+
int visualize_main(int argc, char *argv[]);
20+
21+
static int AllTools_usage ()
22+
{
23+
cerr <<"Program: BamDeal\nVersion: 0.27\t[email protected]\t"<<__DATE__<<endl;
24+
25+
cerr<<""
26+
"\n"
27+
"\tUsage:\n\n"
28+
"\t\tconvert convert tools\n"
29+
"\t\tmodify modify tools\n"
30+
"\t\tstatistics statistics analysis tools\n"
31+
"\t\tvisualize visualize tools for bam\n"
32+
"\n"
33+
"\t\tHelp Show help in detail\n"
34+
"\n";
35+
return 1;
36+
}
37+
38+
static int AllTools_usage2 ()
39+
{
40+
cerr <<"Program: BamDeal\nVersion: 0.27\t[email protected]\t"<<__DATE__<<endl;
41+
42+
cerr<<""
43+
"\n"
44+
"\tUsage:\n\n"
45+
"\t\tconvert convert tools\n"
46+
"\t\tmodify modify tools\n"
47+
"\t\tstatistics statistics analysis tools\n"
48+
"\t\tvisualize visualize tools for bam\n"
49+
"\n"
50+
"\t\tHelp Show help in detail\n"
51+
"\n"
52+
53+
"\t\tjoin the QQ Group : 12529366\n"
54+
"\n";
55+
return 1;
56+
}
57+
58+
59+
int main(int argc, char *argv[])
60+
{
61+
if (argc < 2) { return AllTools_usage(); }
62+
else if (strcmp(argv[1], "convert") == 0) { return convert_main(argc-1, argv+1) ; }
63+
else if (strcmp(argv[1], "statistics") == 0) { return statistics_main(argc-1, argv+1) ; }
64+
else if (strcmp(argv[1], "visualize") == 0) { return visualize_main(argc-1, argv+1) ; }
65+
else if (strcmp(argv[1], "modify") == 0) { return modify_main(argc-1, argv+1) ; }
66+
else if (strcmp(argv[1], "Help") == 0 || strcmp(argv[1], "help") == 0 || strcmp(argv[1], "?")== 0 || ( argv[1][0] == '-' &&( argv[1][1] =='h' || argv[1][1] =='H' || argv[1][1] =='?' ) ) || strcmp(argv[1], "less") == 0 )
67+
{
68+
return AllTools_usage2();
69+
}
70+
else
71+
{
72+
cerr<<"BamDeal [main] unrecognized command "<<argv[1]<<endl;
73+
return 1;
74+
}
75+
76+
return 0;
77+
}
78+
79+

Install.Readme

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
make sure:
3+
a. libhts / htslib (>=1.12) had done ( http://www.htslib.org/download/)
4+
b. gcc/g++ ver >= 4.8 // support Flag [ --std=c++11 ]
5+
6+
#############################
7+
Only two step :
8+
9+
1 ./configure
10+
# you can usr the usr the LDFLAGS to find the htslib library and CXXFLAGS and CFLAGS to find the htslib header
11+
# ./configure LDFLAGS=-L/usr/lib/ CFLAGS="-I/usr/include/" CXXFLAGS="-I/usr/include/"
12+
# Export LIBRARY/CFLAGS/CXXFLAGS environment variables to set the htslib path also can be a way to compile, such : export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
13+
14+
2 make
15+
16+
17+
Note if it can't work . follow below B1-B6 or use the static Compiled [BamDeal_Linux ]
18+
19+
############################################
20+
#autoscan ./
21+
#cp configure.scan configure.ac
22+
23+
# if can't work, follow below 6 commands
24+
B1: aclocal #// src/automake-1.9/aclocal
25+
B2: autoconf #// src/automake-1.9/autoconf
26+
B3: autoheader #// src/automake-1.9/autoheader
27+
B4: automake --add-missing #// src/automake-1.9/automake --add-missing
28+
B5: ./configure
29+
B6: make
30+
#############################################
31+
#swimming in the sky & flying in the sea#
32+
33+
34+

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+

0 commit comments

Comments
 (0)