Skip to content

Commit

Permalink
A bug with both using polyat & qual is fixed. Version incremented.
Browse files Browse the repository at this point in the history
  • Loading branch information
izhbannikov committed Oct 16, 2018
1 parent b11406c commit 410d5d7
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 23 deletions.
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@ ifeq ($(PLATFORM),-DAPPLE)

Illumina.o :
$(CXX) $(CFLAGS) $(OPT) -c -o $(OBJ)Illumina.o $(SRC)Illumina_retro_compiler.cpp
#$(CXX) $(CFLAGS) ${PLATFORM} -O3 -c -o $(OBJ)Illumina.o $(SRC)Illumina_retro_compiler.cpp
#if [ "$(GCCVERSION)" > "4.2" ] ; then \
# $(CXX) $(CFLAGS) -O3 -c -o $(OBJ)Illumina.o $(SRC)Illumina.cpp;\
#else \
# $(CXX) $(CFLAGS) ${PLATFORM} -O3 -c -o $(OBJ)Illumina.o $(SRC)Illumina_retro_compiler.cpp ;\
#fi


MainPipeLine.o :
$(CXX) $(CFLAGS) $(OPT) -c -o $(OBJ)MainPipeLine.o $(SRC)MainPipeLine.cpp

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Description

Program ```SeqyClean```
Version: ```1.10.07 (2017-12-14)```
Version: ```1.10.08 (2017-10-15)```

Main purpose of this software is to pre-process NGS data in order to prepare for downstream analysis.

Expand Down
Binary file added SeqyClean_UserManual_v1.10.08.pdf
Binary file not shown.
4 changes: 0 additions & 4 deletions nbproject/private/configurations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
<configurationDescriptor version="100">
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
<df root="." name="0">
<df name="bin">
</df>
<df name="obj">
</df>
<df name="src">
<in>Dictionary.cpp</in>
<in>Dictionary.h</in>
Expand Down
2 changes: 0 additions & 2 deletions nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/Users/ilya/Projects/seqyclean/src/main.cpp</file>
<file>file:/Users/ilya/Projects/seqyclean/README.md</file>
<file>file:/Users/ilya/Projects/seqyclean/src/Illumina_retro_compiler.cpp</file>
<file>file:/Users/ilya/Projects/seqyclean/src/Illumina.h</file>
</group>
</open-files>
</project-private>
19 changes: 12 additions & 7 deletions src/Illumina_retro_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ double cur_lclip_pe1 = 0.0; double cur_rclip_pe1 = 0.0;
double cur_lclip_pe2 = 0.0; double cur_rclip_pe2 = 0.0;

//Dynamic Illumina: does not need space to store reads:
void IlluminaDynamic()
{
void IlluminaDynamic() {
cnt_avg_len1 = cnt_avg_len2 = 0;
avg_len_pe1 = avg_len_pe2 = 0.0;
cnt1_avg = cnt2_avg = 0;
Expand Down Expand Up @@ -107,8 +106,7 @@ void IlluminaDynamic()
tmp_avg_right_clip_1 = 0; tmp_avg_left_clip_1 = 0;
tmp_avg_right_clip_2 = 0; tmp_avg_left_clip_2 = 0;

if (detailed_report)
{
if (detailed_report) {
rep_file1.open(rep_file_name1.c_str(),ios::out);
rep_file2.open(rep_file_name2.c_str(),ios::out);
}
Expand Down Expand Up @@ -788,7 +786,7 @@ void IlluminaDynamicSE()
screen_duplicates(read, duplicates);
}


TrimIlluminaSE(read, true);

cnt+=1;
Expand Down Expand Up @@ -1331,6 +1329,7 @@ void ClearNNs( vector<Read*>& reads )
int TrimIlluminaSE(Read* read, bool trim_adapter)
{
read->lclip = 0; read->rclip = read->read.length();
// std::cout << read->readID << " " << read->read.length() << " " << read->lclip << " " << read->rclip << "\n";

if(contaminants_flag )
{
Expand All @@ -1350,7 +1349,8 @@ int TrimIlluminaSE(Read* read, bool trim_adapter)
cur_lclip_pe1 += static_cast<double>(read->lclip);
cur_rclip_pe1 += static_cast<double>(read->read.length() - read->rclip);
}



// Trim quality
//If quality trimming flag is set up -> perform the quality trimming before vector/contaminants/adaptors clipping.
if( qual_trim_flag ) {
Expand All @@ -1374,6 +1374,8 @@ int TrimIlluminaSE(Read* read, bool trim_adapter)

cur_lclip_pe1 += static_cast<double>(read->lclip);
cur_rclip_pe1 += static_cast<double>(read->read.length() - read->rclip);


trim_read(read);
}
}
Expand Down Expand Up @@ -1403,7 +1405,7 @@ int TrimIlluminaSE(Read* read, bool trim_adapter)
if(polyat_flag) {
//Trim poly A/T:
PolyAT_Trim(read);

if( (read->rclip > read->poly_A_clip) && (read->poly_A_found)) {
read->rclip = read->poly_A_clip;
read->right_trimmed_by_polyat = 1;
Expand All @@ -1415,7 +1417,9 @@ int TrimIlluminaSE(Read* read, bool trim_adapter)

cur_lclip_pe1 += static_cast<double>(read->lclip);
cur_rclip_pe1 += static_cast<double>(read->read.length() - read->rclip);

trim_read(read);

}


Expand Down Expand Up @@ -1785,6 +1789,7 @@ void trim_read(Read *read)
{
read->discarded = true;
}

}

void update_statistics(Read *read1, Read *read2) {
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

using namespace std;

std::string version = "1.10.07 (2017-12-14)";
std::string version = "1.10.08 (2018-10-15)";

/*Common parameters (default)*/
short KMER_SIZE = 15;
Expand Down
16 changes: 15 additions & 1 deletion src/poly.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void PolyAT_Trim(Read* read)
int left, right;
left = right = 0;

if(qual_trim_flag) {
/*if(qual_trim_flag) {
left = poly_at_left( (char*)read->read.substr( read->lucy_lclip, read->read.length() - read->lucy_lclip ).c_str(), read->lucy_rclip - read->lucy_lclip);
if (left)
{
Expand All @@ -44,6 +44,20 @@ void PolyAT_Trim(Read* read)
read->poly_A_clip = read->read.length()- right;
read->poly_A_found = true;
}
}*/


left = poly_at_left( (char*)read->read.c_str(), read->read.length());
if (left)
{
read->poly_T_clip = left;
read->poly_T_found = true;
}
right = poly_at_right((char*)read->read.c_str(), read->read.length());
if (right)
{
read->poly_A_clip = read->read.length()- right;
read->poly_A_found = true;
}
}

Expand Down

0 comments on commit 410d5d7

Please sign in to comment.