Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
htslib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thierry Schuepbach
htslib
Commits
8133545c
Commit
8133545c
authored
Aug 12, 2014
by
Heng Li
Browse files
Options
Downloads
Patches
Plain Diff
lite-r228: fixes-frequent fai_fetch(); err filter
parent
e24a7c38
Branches
lite
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
htslib/hts.h
+1
-1
1 addition, 1 deletion
htslib/hts.h
main.c
+2
-3
2 additions, 3 deletions
main.c
pileup.c
+5
-3
5 additions, 3 deletions
pileup.c
with
8 additions
and
7 deletions
htslib/hts.h
+
1
−
1
View file @
8133545c
#ifndef HTS_H
#define HTS_H
#define HTS_VERSION "lite-r2
19
"
#define HTS_VERSION "lite-r2
28
"
#include
<stdint.h>
#include
"bgzf.h"
...
...
This diff is collapsed.
Click to expand it.
main.c
+
2
−
3
View file @
8133545c
...
...
@@ -4,8 +4,6 @@
#include
<ctype.h>
#include
"vcf.h"
#define HTSCMD_VERSION "r227"
int
main_samview
(
int
argc
,
char
*
argv
[]);
int
main_vcfview
(
int
argc
,
char
*
argv
[]);
int
main_bamidx
(
int
argc
,
char
*
argv
[]);
...
...
@@ -21,7 +19,8 @@ int main_razip(int argc, char *argv[]);
static
int
usage
()
{
fprintf
(
stderr
,
"
\n
Usage: htscmd-%s <command> <argument>
\n\n
"
,
HTSCMD_VERSION
);
fprintf
(
stderr
,
"
\n
Version: %s
\n
"
,
HTS_VERSION
);
fprintf
(
stderr
,
"Usage: htscmd <command> <argument>
\n\n
"
);
fprintf
(
stderr
,
"Command: samview SAM<->BAM conversion
\n
"
);
fprintf
(
stderr
,
" vcfview VCF<->BCF conversion
\n
"
);
fprintf
(
stderr
,
" tabix tabix for BGZF'd BED, GFF, SAM, VCF and more
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
pileup.c
+
5
−
3
View file @
8133545c
...
...
@@ -105,6 +105,7 @@ int main_pileup(int argc, char *argv[])
fprintf
(
stderr
,
" -l INT minimum query length [%d]
\n
"
,
min_len
);
fprintf
(
stderr
,
" -q INT minimum mapping quality [%d]
\n
"
,
mapQ
);
fprintf
(
stderr
,
" -Q INT minimum base quality [%d]
\n
"
,
baseQ
);
fprintf
(
stderr
,
" -s INT mininum sum of alt quality to output [%d]
\n
"
,
min_sum_q
);
fprintf
(
stderr
,
" -r STR region [null]
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
return
1
;
...
...
@@ -151,11 +152,12 @@ int main_pileup(int argc, char *argv[])
while
(
bam_mplp_auto
(
mplp
,
&
tid
,
&
pos
,
n_plp
,
plp
)
>
0
)
{
// come to the next covered position
if
(
pos
<
beg
||
pos
>=
end
)
continue
;
// out of range; skip
for
(
i
=
aux
.
tot_dp
=
0
;
i
<
n
;
++
i
)
aux
.
tot_dp
+=
n_plp
[
i
];
if
(
aux
.
tot_dp
==
0
)
continue
;
// well, this should not happen
if
(
last_tid
!=
tid
&&
fai
)
{
free
(
ref
);
ref
=
fai_fetch
(
fai
,
h
->
target_name
[
tid
],
&
l_ref
);
last_tid
=
tid
;
}
if
(
aux
.
tot_dp
==
0
)
continue
;
// well, this should not happen
if
(
depth_only
)
{
// only print read depth; no allele information
fputs
(
h
->
target_name
[
tid
],
stdout
);
printf
(
"
\t
%d"
,
pos
+
1
);
// a customized printf() would be faster
if
(
ref
==
0
||
pos
>=
l_ref
+
beg
)
printf
(
"
\t
N"
);
...
...
@@ -184,6 +186,7 @@ int main_pileup(int argc, char *argv[])
a
[
m
]
=
pileup2allele
(
&
plp
[
i
][
j
],
baseQ
,
(
uint64_t
)
i
<<
32
|
j
);
if
(
!
a
[
m
].
is_skip
)
++
m
;
}
if
(
m
==
0
)
continue
;
ks_introsort
(
allele
,
m
,
aux
.
a
);
// count alleles
for
(
i
=
n_alleles
=
1
;
i
<
m
;
++
i
)
...
...
@@ -236,7 +239,6 @@ int main_pileup(int argc, char *argv[])
}
}
putchar
(
'\n'
);
last_tid
=
tid
;
}
free
(
n_plp
);
free
(
plp
);
bam_mplp_destroy
(
mplp
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment