Skip to content

Commit 55e9580

Browse files
author
Jan Winter
committed
fixed FASTQ file handling of NCBI type data
deactivated FASTQ QC and fastq processing by default
1 parent 64a5a54 commit 55e9580

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ __It is your responsibility to obtain all required licenses in case of commercia
147147

148148

149149
```
150-
Version 1.50 (latest)
150+
Version 1.51 (latest)
151+
- fixes regarding FASTQ handling, now supports NCBI type of FASTQ
152+
- deactivated fast FASTQ handling due to incopatibility
153+
154+
Version 1.50
151155
- many fixes with mouse libraries
152156
- improoved speed
153157
- added new sample data for cell fittnes screen

source/app/data_ui.r

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ GGGGGGGEGGGGGGGGGDGGFGGGEEGGFFGGFFCFFF=AFF<CEFFF@EFE
365365
shiny::tags$h4("Create a FASTQ data quality report"),
366366
shiny::helpText("By default, CRISPRAnalyzeR generates a FASTQ data quality report, which can take some time.
367367
However, you can turn it off in case you are in a hurry."),
368-
shinyWidgets::switchInput(inputId = "generateRQC",value = TRUE, onStatus = "success"),
368+
shinyWidgets::switchInput(inputId = "generateRQC",value = FALSE, onStatus = "success"),
369369

370370
# Make a fallback switch for FASTQ extraction using PERL
371371
shiny::tags$br(),
372372
shiny::tags$hr(width="50%"),
373373
shiny::tags$h4("Perform FASTQ extraction in fast mode"),
374374
shiny::helpText("By default, CRISPRAnalyzeR processes FASTQ files using a specialized tool for faster processing. In case you have issues with FASTQ extraction (e.g. all read counts are 0), you can try to disable the fast processing of FASTQ files and revert back to the old method."),
375-
shinyWidgets::switchInput(inputId = "RUSTtools",value = TRUE, onStatus = "success")
375+
shinyWidgets::switchInput(inputId = "RUSTtools",value = FALSE, onStatus = "success")
376376
)
377377

378378
)

source/scripts/CRISPR-extract.pl

+13-3
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ sub reverse_complement_IUPAC {
116116
# found a read, increase counting
117117
$counttotal++;
118118

119+
#print "Found a read"."\n";
119120

120121
# create read file, as we reached a line with a new readID
121122
$fastq{'readID'}=$1;
@@ -130,12 +131,15 @@ sub reverse_complement_IUPAC {
130131
if($inputline2=~m/$pattern/ )
131132
{
132133

134+
#print "found pattern\n";
133135
# found the required pattern, count this
134136
$countextracted++;
135137

136138
$sequenceline = $inputline2;
137139
$fastq{'sequence'} = $1;
138140

141+
#print $1."\n";
142+
139143
$patternlength = length($1);
140144

141145
$fastq{'seqvalid'}=1;
@@ -155,17 +159,21 @@ sub reverse_complement_IUPAC {
155159
# check nextline
156160
$inputline2 = <$readfastq>;
157161

158-
if($inputline2=~m/^\+$/ && $fastq{'seqvalid'}==1 && $fastq{'count'}==2)
162+
if($inputline2=~m/^\+.*$/ && $fastq{'seqvalid'}==1 && $fastq{'count'}==2)
159163
{
160164
# look for the + only to know that next line is QC
161165
$fastq{'qcfound'}=1;
162166
$fastq{'count'}=3;
167+
168+
#print "fuound qc\n";
163169
}
164170
# check nextline
171+
172+
165173
$inputline2 = <$readfastq>;
166174
if ($inputline2=~m/.{2,}/ && $fastq{'seqvalid'}==1 && $fastq{'qcfound'}== 1 && $fastq{'count'}==3)
167175
{
168-
176+
#print "check nextline\n";
169177
$fastq{'valid'}=1;
170178
$fastq{'quality'} = substr($inputline2, $fastq{'stringstart'}, $patternlength);
171179

@@ -177,7 +185,9 @@ sub reverse_complement_IUPAC {
177185

178186
#write to new fastqfile
179187
print $fastqout "@".$fastq{'readID'}."\n".$fastq{'sequence'}."\n+\n".$fastq{'quality'}."\n";
180-
188+
189+
#print "@".$fastq{'readID'}."\n".$fastq{'sequence'}."\n+\n".$fastq{'quality'}."\n";
190+
181191
## Free space
182192
%fastq=();
183193
$fastq{'qcfound'}=0;

0 commit comments

Comments
 (0)