Skip to content

Commit

Permalink
Merge pull request #58 from broadinstitute/mop_update_yg
Browse files Browse the repository at this point in the history
Bug Fix and Add An Additional Output to Mop WDL
  • Loading branch information
yueyaog authored May 20, 2024
2 parents dbb0e06 + 33372ce commit d507386
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions TAG_Mop/TAG_Mop.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ workflow TAG_Mop{
File deleted_sys_files = rmSysfiles.sys_files_to_delete
Int? num_mopped_files = mop.num_of_files_to_mop
File? mopped_files = mop.mopped_files
String? total_size_to_mop = mop.total_size_to_mop
}
meta {
Expand Down Expand Up @@ -115,17 +116,19 @@ workflow TAG_Mop{
# Dry run Mop
fissfc mop -w ~{workspaceName} -p ~{namespace} --dry-run > mop_dry_run.txt
echo Files to mop:" $(cat mop_dry_run.txt | wc -l)"
cat mop_dry_run.txt | wc -l > num_of_files_to_mop.txt
cat mop_dry_run.txt | grep "gs:" | wc -l > num_of_files_to_mop.txt
cat mop_dry_run.txt | grep Total | awk '{print $3 $4}' > total_size_to_mop.txt
# Mop
if [ $(cat mop_dry_run.txt | wc -l) -eq 0 ]; then
echo "No files to mop"
else
fissfc mop -w ~{workspaceName} -p ~{namespace}
fissfc --yes mop -w ~{workspaceName} -p ~{namespace}
fi
>>>
output{
Int num_of_files_to_mop = read_int("num_of_files_to_mop.txt")
String total_size_to_mop = read_string("total_size_to_mop.txt")
File mopped_files = "mop_dry_run.txt"
}
runtime {
Expand Down

0 comments on commit d507386

Please sign in to comment.