Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
ORG.Asm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ORG.Asm
ORG.Asm
Commits
d65f86f9
Commit
d65f86f9
authored
Nov 19, 2014
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No commit message
No commit message
parent
1f4142b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
src/fastq.c
src/fastq.c
+13
-16
No files found.
src/fastq.c
View file @
d65f86f9
...
...
@@ -108,7 +108,7 @@ uint32_t readPairedFastq(char* dest,
if
((
readLength
&
1
)
==
0
)
{
readLength
--
;
fprintf
(
stderr
,
"Read length adjusted to %d"
,
readLength
);
fprintf
(
stderr
,
"Read length adjusted to %d
\n
"
,
readLength
);
}
forwardLength16
=
round16
(
readLength
);
...
...
@@ -126,22 +126,26 @@ uint32_t readPairedFastq(char* dest,
// we read the forward sequence
do
{
// Skip the too short reads
for
(
forwardLength
=
readFastq
(
dest
,
forward
,
maxsize
);
forwardLength
>
0
&&
forwardLength
<
readLength
;
forwardLength
=
readFastq
(
dest
,
forward
,
maxsize
))
// skip the reverse read and take the next forward
reverseLength
=
readFastq
(
dest
,
reverse
,
maxsize
);
// If readLength is not specify set up it from the length of the first sequence
if
(
forwardLength16
==
0
)
{
readLength
=
forwardLength
;
/* If the read length is even then shorten it by one base */
if
((
forwar
dLength
&
1
)
==
0
)
if
((
rea
dLength
&
1
)
==
0
)
{
forwar
dLength
--
;
fprintf
(
stderr
,
"Read length adjusted to %d
"
,
forwar
dLength
);
rea
dLength
--
;
fprintf
(
stderr
,
"Read length adjusted to %d
\n
"
,
rea
dLength
);
}
forwardLength16
=
round16
(
forwar
dLength
);
forwardLength16
=
round16
(
rea
dLength
);
if
(
forwardLength16
*
2
>
maxsize
)
return
0
;
...
...
@@ -158,29 +162,22 @@ uint32_t readPairedFastq(char* dest,
reverseLength
>
0
&&
reverseLength
<
readLength
);
// No more sequences
if
(
forwardLength
==
0
||
reverseLength
==
0
)
return
0
;
if
(
readLength
>
0
&&
forwardLength
>
readLength
)
if
(
(
forwardLength
>=
readLength
)
&&
(
reverseLength
>=
readLength
))
{
for
(
c
=
dest
+
readLength
;
c
<
rdest
;
c
++
)
*
c
=
0
;
if
(
readLength
>
0
&&
reverseLength
>
readLength
)
for
(
c
=
rdest
+
readLength
;
c
<
(
dest
+
maxsize
);
c
++
)
*
c
=
0
;
if
(
readLength
==
0
&&
forwardLength
!=
reverseLength
)
return
0
;
}
// we return the length of one read
if
(
readLength
>
0
)
return
readLength
;
else
return
forwardLength
;
return
readLength
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment