Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.5.0 #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dxapp.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"aws:us-east-1": {
"systemRequirements": {
"main": {
"instanceType": "mem1_ssd1_x2"
"instanceType": "mem1_ssd1_v2_x2"
}
}
}
Expand Down
11 changes: 5 additions & 6 deletions src/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ssh_opts='-q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /hom
# Download old index.html for archiving
# Rsync options: -a archive mode for recursive copy, -v verbose outputs, -h human-readable numbers,
# -z use compression in data transfer, -e SSH command with options
rsync -avhz -e "ssh $ssh_opts" mokaguys@genomics.viapath.co.uk:/var/www/html/mokaguys/multiqc/index.html ${out_dir}/old_index.html
rsync --perms --chmod=Du=rw,Dgo=rw,Fu=rw,Fog=rw -avhz -e "ssh $ssh_opts" mokaguys@genomics.viapath.co.uk:/var/www/html/mokaguys/multiqc/index.html ${out_dir}/old_index.html

# Create a variable containing the SSH command arguments required to determine if the file exists.
# These arguments include the options to connect to the server and the bash 'test' command, with the
Expand All @@ -34,17 +34,16 @@ file_exists_test="$ssh_opts mokaguys@genomics.viapath.co.uk test -e /var/www/htm

# Test if the file exists on the Viapath Genomics server using ssh and ${file_exist_test} arguments. Exit with error code 1 if True.
if ssh ${file_exists_test}; then
echo "ERROR: ${multiqc_html_name} exists at /var/www/html/mokaguys/multiqc/reports/." 1>&2
exit 1
echo "${multiqc_html_name} exists at /var/www/html/mokaguys/multiqc/reports/. Overwriting" 1>&2
fi

# Upload the multiqc html to the multiqc reports directory
rsync -avhz -e "ssh $ssh_opts" ${multiqc_html_path} mokaguys@genomics.viapath.co.uk:/var/www/html/mokaguys/multiqc/reports/${multiqc_html_name}
rsync --perms --chmod=Du=rw,Dgo=rw,Fu=rw,Fog=rw -avhz -e "ssh $ssh_opts" ${multiqc_html_path} mokaguys@genomics.viapath.co.uk:/var/www/html/mokaguys/multiqc/reports/${multiqc_html_name}
#Run docker image to create new_index.html
docker run -v `pwd`:/home/dnanexus seglh/upload_index:latest ${out_dir}/old_index.html ${multiqc_html_path} ${out_dir}/new_index.html

# Upload new index.html to server
rsync -avhz -e "ssh $ssh_opts" ${out_dir}/new_index.html mokaguys@genomics.viapath.co.uk:/var/www/html/mokaguys/multiqc/index.html
rsync --perms --chmod=Du=rw,Dgo=rw,Fu=rw,Fog=rw -avhz -e "ssh $ssh_opts" ${out_dir}/new_index.html mokaguys@genomics.viapath.co.uk:/var/www/html/mokaguys/multiqc/index.html

if [[ "$upload_data_files" == "true" ]]; then
# capture the project name from the multiqc html name (project_name-multiqc.html)
Expand All @@ -64,7 +63,7 @@ if [[ "$upload_data_files" == "true" ]]; then
# for each data file in $multiqc_data_input upload to server
for data_file_path in "${multiqc_data_input_path[@]}"; do
# Upload the multiqc data files to the multiqc reports directory
rsync -avhz -e "ssh $ssh_opts" ${data_file_path} mokaguys@genomics.viapath.co.uk:/var/www/html/mokaguys/multiqc/trend_analysis/multiqc_data/${project_name}
rsync --perms --chmod=Du=rw,Dgo=rw,Fu=rw,Fog=rw -avhz -e "ssh $ssh_opts" ${data_file_path} mokaguys@genomics.viapath.co.uk:/var/www/html/mokaguys/multiqc/trend_analysis/multiqc_data/${project_name}
done
fi

Expand Down