[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "med.bio" under Ubuntu-MATE 18.04 LTS



Hi,

just a short note:  The metapackage is called med-bio (with a dash not a
dot ... just in case somebody might seek in the wrong direction).

On Mon, May 28, 2018 at 01:36:48AM +0100, Tony Travis wrote:
> On 27/05/18 23:13, Tony Travis wrote:
> > [...]
> >>   File "/usr/share/metaphlan2/_metaphlan2.py", line 22
> >>     print("Command: {}".format(' '.join(cmd)), end='\n\n')
> >>                                                   ^
> >> SyntaxError: invalid syntax
> 
> Hi,
> 
> The problem is that "_metaphlan2.py" uses Python3 syntax but the Debian
> "postinst" script runs "pycompile" on it, which defaults to Python2.
> 
> Here is a patch, with the print function included from the future and
> function annotations removed.

Thanks for the patch - I'll upload it soon.  Regarding the bug report:
If the issue can be verified on a Debian system it surely belongs to the
Debian BTS.  In general we try hard to fix also bugs reported on Ubuntu
(if somebody points us to the issue).


I have a question to the patch below:

> --- _metaphlan2.py.orig	2018-02-07 10:43:00.000000000 +0000
> +++ _metaphlan2.py	2018-05-28 01:27:41.168280522 +0100
> @@ -3,7 +3,7 @@
>  # This module defines the functions which run MetaPhlAn2 on
>  # single and paired fastq data.
>  
> -
> +from __future__ import print_function

OK, this fits the description of the patch and should solve the
issue.

>  import subprocess as sb
>  from q2_types.per_sample_sequences import SingleLanePerSampleSingleEndFastqDirFmt
>  from q2_types.per_sample_sequences import SingleLanePerSamplePairedEndFastqDirFmt
> @@ -11,7 +11,6 @@
>  import biom
>  import os
>  
> -
>  def metaphlan2_helper(raw_data, nproc, input_type, output_file, verbose=True):
>      cmd = ['metaphlan2.py', str(raw_data), '--input_type', str(input_type),
>             '--biom', str(output_file), '--nproc', str(nproc)]
> @@ -24,8 +23,7 @@
>      sb.run(cmd, check=True)
>  
>  
> -def profile_single_fastq(raw_data: SingleLanePerSampleSingleEndFastqDirFmt,
> -                         nproc: int=1) -> biom.Table:
> +def profile_single_fastq(raw_data, nproc=1):
>      output_biom = None

Could you please comment on this chunk (and the similar one later)?  In
how far is this related to the issue above?

Thanks a lot for your contribution

       Andreas.

-- 
http://fam-tille.de


Reply to: