Skip to content

Commit

Permalink
fix bug w long read
Browse files Browse the repository at this point in the history
  • Loading branch information
pratas committed Oct 2, 2023
1 parent 5a592a5 commit 0d40fd6
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/JARVIS3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ THREADS="8";
SHOW_MENU () {
echo " -------------------------------------------------------";
echo " ";
echo " JARVIS3, v3.4. High reference-free compression of DNA ";
echo " JARVIS3, v3.5. High reference-free compression of DNA ";
echo " sequences, FASTA data, and FASTQ data. ";
echo " ";
echo " Program options ---------------------------------------";
Expand Down Expand Up @@ -80,7 +80,7 @@ SHOW_HEADER () {
echo " [JARVIS3 :: DNA, FASTA, and FASTQ Extensions] ";
echo " ";
echo " Release year: 2024, ";
echo " Version: 3.4 ";
echo " Version: 3.5 ";
echo " Author: D. Pratas ";
echo " Language: Bash / C ";
echo " License: GPL v3 ";
Expand All @@ -103,7 +103,7 @@ MERGE_DNA () {
#
mapfile -t FILES < .DEC_F_JV3;
#
D_NAMES="";
NAMES="";
IDX_T=1;
IDX_POS=1;
#
Expand Down Expand Up @@ -366,7 +366,7 @@ if [[ "$DECOMPRESS" -eq "0" ]];
SPLIT_DNA "DNA.JV3" "$BLOCK" "$THREADS" "$LEVEL" &
./bzip2 -f N.JV3 &
./bbb cfm10q HEADERS.JV3 HEADERS.JV3.bbb &
./XScoreC -l 2 QUALITIES.JV3 1> .tmp_report_out_xc 2> .tmp_report_err_xc &
./XScoreC -l 1 QUALITIES.JV3 1> .tmp_report_out_xc 2> .tmp_report_err_xc &
wait
tar -cvf $INPUT.tar DNA.JV3.tar N.JV3.bz2 HEADERS.JV3.bbb QUALITIES.JV3.co 1> .rep_main_info;
echo "Done!";
Expand Down
Binary file removed src/extra/MergeFastaStreams
Binary file not shown.
Binary file removed src/extra/MergeFastqStreams
Binary file not shown.
10 changes: 6 additions & 4 deletions src/extra/MergeFastqStreams.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdint.h>

// This application merges four channels of information:
// * HEADERS;
Expand Down Expand Up @@ -35,7 +36,8 @@ int main(int argc, char *argv[]){
return 1;
}

unsigned idx = 0, idx2 = 0, n, max = 10000;
// FIXME: IF READ LARGER THAN 2000000 PROBLEMS WILL OCCUR
uint64_t idx = 0, idx2 = 0, n, max = 1000000;
int qual_str[max+1];
int n_str [max+1];

Expand Down Expand Up @@ -68,13 +70,13 @@ int main(int argc, char *argv[]){
if(n_str[n] == 'a'){
c = fgetc(DNA);
if(c == EOF) break;
else fprintf(stdout, "%c", c);
else fprintf(stdout, "%c", c); // WRITE DNA
}
else fprintf(stdout, "N");
else fprintf(stdout, "N"); // WRITE N
}

fprintf(stdout, "\n+\n");
for(n = 0 ; n <= idx ; ++n)
for(n = 0 ; n <= idx ; ++n) // WRITE QUALS
fprintf(stdout, "%c", qual_str[n]);
}

Expand Down
Binary file removed src/extra/SplitFastaStreams
Binary file not shown.
Binary file removed src/extra/SplitFastqStreams
Binary file not shown.
Binary file modified src/extra/XScoreC
Binary file not shown.
Binary file modified src/extra/XScoreD
Binary file not shown.
Binary file modified src/extra/bbb
Binary file not shown.
Binary file modified src/extra/bzip2
Binary file not shown.
2 changes: 1 addition & 1 deletion src/extra/levels.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
#define LEVEL_1 " 1: -tm 1:1:0.95/0:0:0 -tm 4:100:0.2/0:0:0 "
#define LEVEL_1 " 1: -tm 3:1:0.2/0:0:0 "
#define LEVEL_2 " 2: -tm 1:1:0.95/0:0:0 -tm 4:200:0.2/0:0:0 "
#define LEVEL_3 " 3: -tm 2:10:0.95/0:0:0 -tm 4:200:0.2/0:0:0 "
#define LEVEL_4 " 4: -tm 2:10:0.95/0:0:0 -tm 6:500:0.2/0:0:0 "
Expand Down

0 comments on commit 0d40fd6

Please sign in to comment.