Closed smoe closed 5 years ago
sorry about that. I think in this repo we were working from master. I just sync the branches, can you pull and try again, please?
as well, I run the tests always with nosetest
, I think I don't have it set it up properly to run with python setup.py test
, can you try with nosetest
and see if that works?
Sorry for my late reply. With nosetest3 there are some python3 issues surfacing. The first is
['cluster', '-m', '../../data/examples/cluster/seqs_set.ma', '-a', '../../data/examples/cluster/seqs_map.bam', '--gtf', '../../data/examples/cluster/ann_reduced.gtf', '-r', '../../data/genomes/genome.fa', '-o', 'test_out_res']
INFO Run cluster
INFO Checking parameters and files
INFO Output dir will be: test_out_res
INFO Clean bam file with highly repetitive reads with low counts. sum(counts)/n_hits > 1%
INFO error at command
Traceback (most recent call last):
File "/usr/bin/seqcluster", line 11, in <module>
load_entry_point('seqcluster==1.2.4a8', 'console_scripts', 'seqcluster')()
File "/usr/lib/python3/dist-packages/seqcluster/command_line.py", line 28, in main
cluster(kwargs["args"])
File "/usr/lib/python3/dist-packages/seqcluster/make_clusters.py", line 44, in cluster
bam_file, seq_obj = _clean_alignment(args)
File "/usr/lib/python3/dist-packages/seqcluster/make_clusters.py", line 249, in _clean_alignment
bam_file, seq_obj = clean_bam_file(args.afile, args.mask)
File "/usr/lib/python3/dist-packages/seqcluster/detect/cluster.py", line 50, in clean_bam_file
run("samtools index %s" % bam_in)
File "/usr/lib/python3/dist-packages/seqcluster/libs/do.py", line 16, in run
logger.debug(" ".join(str(x) for x in cmd) if not isinstance(cmd, basestring) else cmd)
NameError: name 'basestring' is not defined
which stackoverflow claims to be directly substitutable with "str". The other issue surfacing stackoverflow describes here https://stackoverflow.com/questions/26967509/attributeerror-io-textiowrapper-object-has-no-attribute-next-python . In short, there is no next() function with python3.
======================================================================
ERROR: test_preparedata (test.test_preparedata.TestPreparedata)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/moeller/git/debian-med/seqcluster-smoe/seqcluster/test/test_preparedata.py", line 20, in test_preparedata
seq_l, list_s = _read_fastq_files(open("data/examples/collapse/config"), args)
File "/home/moeller/git/debian-med/seqcluster-smoe/seqcluster/seqcluster/prepare_data.py", line 108, in _read_fastq_files
seq = handle.next().strip()
AttributeError: '_io.TextIOWrapper' object has no attribute 'next'
======================================================================
ERROR: test_umis (test.test_preparedata.TestPreparedata)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/moeller/git/debian-med/seqcluster-smoe/seqcluster/test/test_preparedata.py", line 32, in test_umis
umis = collapse(os.path.abspath("data/examples/umis/sample.fastq"))
File "/home/moeller/git/debian-med/seqcluster-smoe/seqcluster/seqcluster/libs/fastq.py", line 20, in collapse
return collapse_umi(in_file)
File "/home/moeller/git/debian-med/seqcluster-smoe/seqcluster/seqcluster/libs/fastq.py", line 40, in collapse_umi
seq = handle.next().strip()
AttributeError: '_io.TextIOWrapper' object has no attribute 'next'
-------------------- >> begin captured logging << --------------------
seqbuster: INFO: Find UMI tags in read names, collapsing by UMI.
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 6 tests in 2.849s
FAILED (errors=4)
I'll send a pull request with substitutes of next() with readline().
The nosetests3 still fail, but now because an executable is not found:
ERROR: Run miraligner analysis
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/moeller/git/debian-med/seqcluster-smoe/seqcluster/test/test_automated_analysis.py", line 107, in test_srnaseq_miraligner
subprocess.check_call(cl)
File "/usr/lib/python3.6/subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.6/subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'seqcluster': 'seqcluster'
-------------------- >> begin captured stdout << ---------------------
seqcluster seqbuster --sps hsa --hairpin ../../data/examples/miraligner/hairpin.fa --mirna ../../data/examples/miraligner/miRNA.str --gtf ../../data/examples/miraligner/hsa.gff3 -o test_out_mirs_fasta --miraligner ../../data/examples/miraligner/sim_isomir.fa
--------------------- >> end captured stdout << ----------------------
Does that ring any bell?
Cheers,
Steffen
hum, I think it could be related to how python3 is linking the command lines mentioned in setup.py. I'll try to take a look early next week.
thanks!
This happens when running the tests from outside the build folder. Sorry, my bad.
Hello, I have checked out your devel branch. Invoking tests, with python 2.7 this shows
while python 3.6.6 gives me
Can you possibly reproduce that?
Cheers, Steffen