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
ClaiRO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
A.J. Sethi
ClaiRO
Commits
eced96ec
Commit
eced96ec
authored
Oct 20, 2020
by
A.J. Sethi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding whippet support
parent
290fe98d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
core-w/2020-10-18_makeIndex.sh
core-w/2020-10-18_makeIndex.sh
+26
-8
No files found.
core-w/2020-10-18_makeIndex.sh
View file @
eced96ec
...
...
@@ -57,7 +57,7 @@ do
unset
OPTIND
unset
OPTARG
while
getopts
a:
b:o:t:v:m
: options
while
getopts
a:
n:c:o:t:v:m:w
: options
do
case
$options
in
...
...
@@ -71,12 +71,17 @@ do
export
myAnnotation
=
"
${
input
}
/
$(
ls
${
OPTARG
}
|
grep
-e
".gtf"
)
"
;;
b
)
# binary
alignments
[
-d
${
OPTARG
}
]
&&
export
bamDir
=
"
${
OPTARG
}
"
&&
bamList
=
`
ls
-d
${
OPTARG
}
/
*
.
*
`
||
die
"cannot fetch input files"
# get a list of files in the primary input
bamCount
=
$(
echo
$
bamList
|
grep
-c
-e
".bam"
)
[
${
bamCount
}
-gt
"0"
]
||
die
"no binary alignments found in
${
bamDir
}
"
n
)
# nacent RNA
alignments
[
-d
${
OPTARG
}
]
&&
export
nbamDir
=
"
${
OPTARG
}
"
&&
n
bamList
=
`
ls
-d
${
OPTARG
}
/
*
.
*
`
||
die
"cannot fetch input files"
# get a list of files in the primary input
nbamCount
=
$(
echo
$n
bamList
|
grep
-c
-e
".bam"
)
[
${
nbamCount
}
-gt
"0"
]
||
die
"no binary alignments found in
${
n
bamDir
}
"
;;
c
)
# cytoplasmic RNA alignments
[
-d
${
OPTARG
}
]
&&
export
cbamDir
=
"
${
OPTARG
}
"
&&
cbamList
=
`
ls
-d
${
OPTARG
}
/
*
.
*
`
||
die
"cannot fetch input files"
# get a list of files in the primary input
cbamCount
=
$(
echo
$cbamList
|
grep
-c
-e
".bam"
)
[
${
cbamCount
}
-gt
"0"
]
||
die
"no binary alignments found in
${
cbamDir
}
"
;;
o
)
# output directory
export
outputDirectory
=
"
${
OPTARG
}
"
mkdir
-p
${
outputDirectory
}
2>/dev/null
...
...
@@ -108,6 +113,8 @@ do
else
die
"could not parse the user provided runmode,
${
OPTARG
}
"
;
fi
;;
w
)
# path to whippet index
esac
;
done
shift
$((
OPTIND-1
))
...
...
@@ -123,7 +130,6 @@ done
vsec
"your annotation is
${
myAnnotation
}
"
vsec
"your reference sequence is
${
myReferenceSequence
}
"
# validate the binary alignments
[
"
${
bamCount
}
"
-gt
"0"
]
||
die
"did not detect any bam files in the input"
ssec
"detected
${
bamCount
}
bam files"
...
...
@@ -131,6 +137,7 @@ ssec "detected ${bamCount} bam files"
# validate output directory
[
-d
"
${
outputDirectory
}
"
]
||
die
"cannot access your output directory"
vsec
"Your output directory is
${
outputDirectory
}
"
export od
=
${
outputDirectory
}
# validate threadCount
ssec
"proceeding with
${
threadCount
}
threads"
...
...
@@ -141,5 +148,16 @@ ssec "your runmode is ${MODE}"
vsec
"completed housekeeping; parsing GTF"
####################################################################################################
####################################################################################################
####################################
# generate on the fly whippet index using mature bams
# first, merge the mature bams
matureSamMerge
=
"
${
od
}
/matureSamMerge"
;
mkdir
-p
${
matureSamMerge
}
2>/dev/null
cd
${
cbamDir
}
&&
samtools merge -@
${
threadCount
}
${
matureSamMerge
}
/merged.bam
`
ls
*
.bam
`
||
die
"cannot merge the cytoplasmic RNA alignments"
samtools
sort
-@
${
threadCount
}
${
matureSamMerge
}
/merged.bam
>
${
matureSamMerge
}
/sorted.merged.bam
||
die
"cannot sort your bam"
samtools index -@
${
threadCount
}
${
matureSamMerge
}
/sorted.merged.bam
||
die
"cannot index your merged bam"
# next, generate on-the-fly whippet index
julia bin/whippet-index.jl
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