Compare commits

..

No commits in common. "c1b7df1172a9ddf13ff354f06752072f93439a4e" and "c601a8b65f1832439e64e37d3137fe0cf5ed10b3" have entirely different histories.

4 changed files with 2 additions and 38 deletions

View file

@ -1,12 +0,0 @@
cmake_minimum_required(VERSION 3.0)
project(tnt_script)
SET( CMAKE_EXPORT_COMPILE_COMMANDS ON )
set(CMAKE_CXX_STANDARD 11)
add_executable(gene_marker gene_marker.cpp)
add_executable(trim_marker trim_marker.cpp)
target_compile_options(gene_marker PRIVATE -Wall -Wextra -pedantic -O3)
target_compile_options(trim_marker PRIVATE -Wall -Wextra -pedantic -O3)

View file

@ -1,24 +0,0 @@
- Author: Guoyi Zhang
- License: GPLv2
## gene_marker
Generate fasta file which `m` means selected position by Gblocks from Gblocks html report file.
Usage:
```
gene_marker <input_file> <output_file>
```
## trim_marker
Trim the multi-sequence-alignment based on the marker which `m` indicates selected position.
Usage:
```
trim_marker <marker_fasta_file> <input_fasta_file> <output_file>
```

View file

@ -15,7 +15,7 @@
bool checkArguments(int argc, char* argv[]) {
if (argc != 3) {
std::cerr << "Usage: " << argv[0]
<< " <input_file> <output_file>\n";
<< " input_file output_file\n";
return false;
}
return true;

View file

@ -58,7 +58,7 @@ void extract_characters(const std::string& line, const std::string& file,
const std::vector<int> positions) {
std::ofstream outfile(file, std::ios::app);
std::string new_line;
for (unsigned long pos : positions) {
for (int pos : positions) {
if (pos <= line.length()) {
new_line += line[pos - 1]; // start from 0
}