Skip to content

Commit

Permalink
add realtime to summary file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie - Luise Heidig authored and Sophie - Luise Heidig committed Mar 21, 2024
1 parent 45dca07 commit 91180df
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions bin/count_realtime_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ def extract_realtime_column(file_path):
total = sum(realtime_columns)/60000 #convert to minutes
total_tcoffee = sum(realtimes_tcoffee_columns)/60000 #convert to minutes

print(f"Total realtime: {round(total)} minutes")
print(f"Total realtime {prop_of_interest} only: {round(total_tcoffee)} minutes")
print(f"* Total runtime (without queue time): {round(total)} minutes")
print(f"* Total runtime {prop_of_interest} only: {round(total_tcoffee)} minutes")
4 changes: 2 additions & 2 deletions bin/sequence_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
av_id = round(100*sum(id_ratios)/len(id_ratios) ,2)
#print (av_id)

line = 'The final alignment contains ' +str(common_counter)+ ' conserved positions and ' +str(occupied)+ ' gapless positions of '+str(positions)+ ' total positions.'
line2 = 'The average pairwise sequence identity in the final alignment is ' +str(av_id) + '%. Gaps were treated as missmatch.'
line = '* The final alignment contains ' +str(common_counter)+ ' conserved positions and ' +str(occupied)+ ' gapless positions of '+str(positions)+ ' total positions.'
line2 = '* The average pairwise sequence identity in the final alignment is ' +str(av_id) + '%. Gaps were treated as missmatch.'

print(line)
print(line2)
Expand Down
15 changes: 11 additions & 4 deletions modules/utils.nf
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ process createSummary{

val reorder
val convert // convertMSA
val commandline

output:
path "*.md"
Expand All @@ -170,6 +171,8 @@ process createSummary{
echo "Find detailed explations for each step on [GitHub](https://github.com/Bio2Byte/simsapiper) "
echo '\n All output files can be found here: ' $outdir
echo '\n The command executed was: ' $commandline
echo "# Input sequences files "
echo '* No. of sequences in inputfile(s): ' $foundSequencesCount
Expand Down Expand Up @@ -199,7 +202,7 @@ process createSummary{
fi
echo "## 1.3 Invalid sequences "
echo '* $seqsInvalidCount sequences removed because they contained more then $seqQC % non-standard or unresolved amino acids'
echo '* Sequences removed because they contained more then $seqQC % non-standard or unresolved amino acids: ' $seqsInvalidCount
if (( $seqsInvalidCount != 0 ));then
echo '* Find invalid sequences here:' $outdir/seqs/too_many_unknown_characters.fasta
fi
Expand Down Expand Up @@ -269,7 +272,7 @@ process createSummary{
echo '## 7.2 Squeeze MSA towards conserved secondary structure elements'
echo '* Categories selected for squeezing: ' $squeeze
echo '* Threshold for region to be considered conserved: ' $squeezePerc
echo '* Squeezed alignemnt: '$outdir/msas/squeezed_merged*.fasta
echo '* Squeezed alignment: ' $outdir/msas/squeezed_merged*.fasta
echo '## 7.3 Map DSSP to squeezed MSA'
echo '* DSSP codes mapped to merged alignment:' $outdir/msas/dssp_squeezed_merged*.fasta
Expand Down Expand Up @@ -301,11 +304,15 @@ process createSummary{
echo '# 9 Convert MSA'
echo '* Converted MSA to ' $convert 'format'
echo '* Converted MSA: ' $outdir/msas/converted*.fasta
else
echo '# 9 Convert MSA: false'
fi
for i in $outdir/resources*.txt ; do
echo '# Execution time'
python3 $projectDir/bin/count_realtime_job.py \$i
done
cp .command.out \$outfile
"""
Expand Down
3 changes: 2 additions & 1 deletion simsapiper.nf
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ workflow {
params.squeeze ,
params.squeezePerc ,
params.reorder ,
params.convertMSA
params.convertMSA,
"$workflow.commandLine"
)

}
Expand Down

0 comments on commit 91180df

Please sign in to comment.