Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
00ba1cf6
Commit
00ba1cf6
authored
8 years ago
by
bow
Browse files
Options
Downloads
Patches
Plain Diff
Add updates to addres issue #371
parent
37b7f677
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala
+6
-2
6 additions, 2 deletions
...scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala
docs/tools/ExtractAlignedFastq.md
+10
-5
10 additions, 5 deletions
docs/tools/ExtractAlignedFastq.md
with
16 additions
and
7 deletions
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala
+
6
−
2
View file @
00ba1cf6
...
...
@@ -192,7 +192,7 @@ object ExtractAlignedFastq extends ToolCommand {
opt
[
String
](
'r'
,
"interval"
)
required
()
unbounded
()
valueName
"<interval>"
action
{
(
x
,
c
)
=>
// yes, we are appending and yes it's O(n) ~ preserving order is more important than speed here
c
.
copy
(
intervals
=
c
.
intervals
:+
x
)
}
text
"Interval strings"
}
text
"Interval strings
(e.g. chr1:1-100)
"
opt
[
File
](
'i'
,
"in1"
)
required
()
valueName
"<fastq>"
action
{
(
x
,
c
)
=>
c
.
copy
(
inputFastq1
=
x
)
...
...
@@ -220,7 +220,11 @@ object ExtractAlignedFastq extends ToolCommand {
opt
[
Int
](
's'
,
"read_suffix_length"
)
optional
()
action
{
(
x
,
c
)
=>
c
.
copy
(
commonSuffixLength
=
x
)
}
text
"Length of common suffix from each read pair (default: 0)"
}
text
"""Length of suffix mark from each read pair (default: 0). This is used for distinguishing read pairs with
different suffices. For example, if your FASTQ records end with `/1` for the first pair and `/2` for the
second pair, the value of `read_suffix_length` should be 2."
"""
.
stripMargin
note
(
"""
...
...
This diff is collapsed.
Click to expand it.
docs/tools/ExtractAlignedFastq.md
+
10
−
5
View file @
00ba1cf6
...
...
@@ -23,7 +23,7 @@ Usage: ExtractAlignedFastq [options]
-I <bam> | --input_file <bam>
Input BAM file
-r <interval> | --interval <interval>
Interval strings
Interval strings
(e.g. chr1:1-100)
-i <fastq> | --in1 <fastq>
Input FASTQ file 1
-j <fastq> | --in2 <fastq>
...
...
@@ -35,15 +35,20 @@ Usage: ExtractAlignedFastq [options]
-Q <value> | --min_mapq <value>
Minimum MAPQ of reads in target region to remove (default: 0)
-s <value> | --read_suffix_length <value>
Length of common suffix from each read pair (default: 0)
This tool creates FASTQ file(s) containing reads mapped to the given alignment intervals.
Length of suffix mark from each read pair (default: 0). This is used for distinguishing read pairs with
different suffices. For example, if your FASTQ records end with `/1` for the first pair and `/2` for the
second pair, the value of `read_suffix_length` should be 2.
This tool creates FASTQ file(s) containing reads mapped to the given alignment intervals. A set of FASTQ files that was
used in creating the BAM file is also required since this is used for retrieving full sequences of FASTQ records which
map to the given region. This is useful since some of the records may have undergone modifications such as quality
trimming before alignment. In this case, retrieving the aligned SAM records will only give the modified sequence.
~~~
To run the tool:
~~~
biopet tool ExtractAlignedFastq \
--input_file myBam.bam --in1 myFastq_R1.fastq --out1 myOutFastq_R1.fastq --interval
myTarget.bed
--input_file myBam.bam --in1 myFastq_R1.fastq --out1 myOutFastq_R1.fastq --interval
chr5:100-200
~~~
*
Note that this tool works for single end and paired end data. The above example can be easily extended for paired end data.
The only thing one should add is:
`--in2 myFastq_R2.fastq --out2 myOutFastq_R2.fastq`
...
...
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