-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP Supernova cloud pipeline scripts to convert
- Loading branch information
Showing
3 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
assembly_id="${1}" | ||
if [ -z "${assembly_id}" ]; then | ||
echo "USAGE: $0 ASSEMBLY_ID" | ||
exit 1 | ||
fi | ||
|
||
assembly_dir="/mnt/disks/linked-reads-pilot/assembly/${assembly_id}"; | ||
if [ ! -d "${assembly_dir}" ]; then | ||
echo "No assembly directory! ${assembly_dir}" | ||
exit 1 | ||
fi | ||
|
||
mkoutput_dir="${assembly_dir}/mkoutput"; | ||
mkdir -p "${mkoutput_dir}" | ||
cd "${mkoutput_dir}" | ||
|
||
source /opt/supernova-2.0.0/sourceme.bash | ||
for style in raw megabubbles pseudohap2; do | ||
exec "supernova mkoutput --asmdir=$assembly_dir/outs/assembly --outprefix=${assembly_id}.${style} --style=${style}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
sample="${1}" | ||
if [ -z "${sample}" ]; then | ||
echo "No sample given!" | ||
exit 1 | ||
fi | ||
|
||
echo "GCloud Auth" | ||
gcloud auth activate-service-account --key-file /etc/gcp-auth/WashU-Genome-Inh-Dis-Analysis.service-account-key.json | ||
|
||
data_base_path="/mnt/disks/data" | ||
fastq_path="${data_base_path}/reads/${sample}" | ||
mkdir -p "${fastq_path}" | ||
assembly_base_path="${data_base_path}/assembly" | ||
mkdir -p "${assembly_base_path}" | ||
|
||
echo "Sample: ${sample}" | ||
echo "Rsyncing fastqs from the object store..." | ||
cd "${fastq_path}" | ||
gsutil ls gs://mgi-rg-linked-reads-ccdg-pilot/reads/H53J3DSXX/${sample}/ | ||
gsutil -m rsync -r gs://mgi-rg-linked-reads-ccdg-pilot/reads/H53J3DSXX/${sample}/ . | ||
echo "Rsyncing fastqs from the object store...OK" | ||
|
||
echo "Running supernova..." | ||
cd "${assbemly_base_path}" | ||
source /opt/supernova-2.0.1/sourceme.bash | ||
supernova run --id="${sample}" --fastqs="${fastq_path}" --uiport=63108 --nodebugmem --localcores=50 --localmem=320 | ||
echo "Running supernova...OK" | ||
|
||
echo "Running mkoutput..." | ||
assembly_path="${assembly_base_path}/${sample}" | ||
mkoutput_path="${assembly_path}/mkoutput"; | ||
mkdir -p "${mkoutput_path}" | ||
cd "${mkoutput_dir}" | ||
for style in raw megabubbles pseudohap2; do | ||
exec supernova mkoutput --asmdir="${assembly_path}/outs/assembly" --outprefix="${sample}.${style}" --style="${style}" | ||
done | ||
echo "Running mkoutput...OK" | ||
|
||
echo "Rsyncing assembly to object store..." | ||
cd "${assembly_base_path}" | ||
echo gsutil -m rsync -r "${sample}" "gs://mgi-rg-linked-reads-ccdg-pilot/assembly/${sample}" | ||
echo "Rsyncing assembly to object store...OK" | ||
|
||
echo "Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package Tenx::Assembly::Command::Mkoutput; | ||
|
||
use strict; | ||
use warnings 'FATAL'; | ||
|
||
class Tenx::Assembly::Command::Mkoutput { | ||
is => 'Command::V2', | ||
has_input => { | ||
assembly => { | ||
is => 'Tenx::Assembly', | ||
doc => 'The assembly to run mkoutput on.', | ||
}, | ||
styles => { | ||
is => 'Text', | ||
is_many => 1, | ||
valid_values => [qw/ raw megabubbles pseudohap2 /], | ||
default_value => 'raw,megabubbles,pseudohap2', | ||
doc => 'The style of mkutput to run.', | ||
}, | ||
}, | ||
}; | ||
|
||
sub shortcut { | ||
die "shortcut is not implemented" | ||
} | ||
|
||
sub execute { | ||
my ($self) = @_; | ||
|
||
#mkdir $self->assembly->mkoutput_path; | ||
|
||
for my $style ( $self->styles ) { | ||
$self->status_message("Style: $style"); | ||
} | ||
|
||
1; | ||
} | ||
|
||
1; |