-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
何伟明(Weiming He)
committed
Dec 21, 2022
1 parent
1b7f828
commit 728a094
Showing
64 changed files
with
30,168 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#include <iostream> | ||
#include <fstream> | ||
#include <sstream> | ||
#include <string> | ||
#include <cstdlib> | ||
#include <stdio.h> | ||
#include <string.h> | ||
#include <zlib.h> | ||
#include "src/convert/covert.h" | ||
#include "src/modify/modify.h" | ||
#include "src/statistics/statistics.h" | ||
#include "src/visualize/visualize.h" | ||
|
||
using namespace std; | ||
|
||
int convert_main(int argc, char *argv[]) ; | ||
int modify_main(int argc, char *argv[]); | ||
int statistics_main(int argc, char *argv[]); | ||
int visualize_main(int argc, char *argv[]); | ||
|
||
static int AllTools_usage () | ||
{ | ||
cerr <<"Program: BamDeal\nVersion: 0.27\thewm2008@gmail.com\t"<<__DATE__<<endl; | ||
|
||
cerr<<"" | ||
"\n" | ||
"\tUsage:\n\n" | ||
"\t\tconvert convert tools\n" | ||
"\t\tmodify modify tools\n" | ||
"\t\tstatistics statistics analysis tools\n" | ||
"\t\tvisualize visualize tools for bam\n" | ||
"\n" | ||
"\t\tHelp Show help in detail\n" | ||
"\n"; | ||
return 1; | ||
} | ||
|
||
static int AllTools_usage2 () | ||
{ | ||
cerr <<"Program: BamDeal\nVersion: 0.27\thewm2008@gmail.com\t"<<__DATE__<<endl; | ||
|
||
cerr<<"" | ||
"\n" | ||
"\tUsage:\n\n" | ||
"\t\tconvert convert tools\n" | ||
"\t\tmodify modify tools\n" | ||
"\t\tstatistics statistics analysis tools\n" | ||
"\t\tvisualize visualize tools for bam\n" | ||
"\n" | ||
"\t\tHelp Show help in detail\n" | ||
"\n" | ||
"\t\t✉️ hewm2008@gmail.com / hewm2008@qq.com\n" | ||
"\t\tjoin the QQ Group : 12529366\n" | ||
"\n"; | ||
return 1; | ||
} | ||
|
||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
if (argc < 2) { return AllTools_usage(); } | ||
else if (strcmp(argv[1], "convert") == 0) { return convert_main(argc-1, argv+1) ; } | ||
else if (strcmp(argv[1], "statistics") == 0) { return statistics_main(argc-1, argv+1) ; } | ||
else if (strcmp(argv[1], "visualize") == 0) { return visualize_main(argc-1, argv+1) ; } | ||
else if (strcmp(argv[1], "modify") == 0) { return modify_main(argc-1, argv+1) ; } | ||
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 ) | ||
{ | ||
return AllTools_usage2(); | ||
} | ||
else | ||
{ | ||
cerr<<"BamDeal [main] unrecognized command "<<argv[1]<<endl; | ||
return 1; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
make sure: | ||
a. libhts / htslib (>=1.12) had done ( http://www.htslib.org/download/) | ||
b. gcc/g++ ver >= 4.8 // support Flag [ --std=c++11 ] | ||
|
||
############################# | ||
Only two step : | ||
|
||
1 ./configure | ||
# you can usr the usr the LDFLAGS to find the htslib library and CXXFLAGS and CFLAGS to find the htslib header | ||
# ./configure LDFLAGS=-L/usr/lib/ CFLAGS="-I/usr/include/" CXXFLAGS="-I/usr/include/" | ||
# 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 | ||
|
||
2 make | ||
|
||
|
||
Note if it can't work . follow below B1-B6 or use the static Compiled [BamDeal_Linux ] | ||
|
||
############################################ | ||
#autoscan ./ | ||
#cp configure.scan configure.ac | ||
|
||
# if can't work, follow below 6 commands | ||
B1: aclocal #// src/automake-1.9/aclocal | ||
B2: autoconf #// src/automake-1.9/autoconf | ||
B3: autoheader #// src/automake-1.9/autoheader | ||
B4: automake --add-missing #// src/automake-1.9/automake --add-missing | ||
B5: ./configure | ||
B6: make | ||
############################################# | ||
#swimming in the sky & flying in the sea# | ||
|
||
|
||
|
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
Oops, something went wrong.