<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _guess_cmd_name(self, cmd):
 """ Manually guess some known command names, where we can do a better job than the automatic parsing. """


        # zcat to bowtie
        if cmd[0] == 'zcat' and 'bowtie' in cmd:
            return 'bowtie'
        # samtools
        if cmd[0] == 'samtools':
            return ' '.join(cmd[0:2])
        # java (eg. picard)
        if cmd[0] == 'java':
            jars = [s for s in cmd if '.jar' in s]
            return os.path.basename(jars[0].replace('.jar', ''))
        return cmd[0]