ngs-docs / ngs-scripts

scripts!
11 stars 49 forks source link

Missing parentheses in call to 'print'/blast-to-csv.py #3

Open mariemh23 opened 6 years ago

mariemh23 commented 6 years ago

Hello,

I try to use blast-to-csv.py but it seems that it does not work. I received this error message :
File "blastparser.py", line 333 print '...', n ^ SyntaxError: Missing parentheses in call to 'print'

Any help? Thanks

ctb commented 6 years ago

Hi @mariemh, that's a python 2 script, and you're probably running python 3. We haven't maintained this repository, I'm afraid.

What are you trying to do? We have updated tutorials for many things that I can point you at.

mariemh23 commented 6 years ago

Hello, Thanks for the reply . I tried to run it with python2.6 and it works. However, I get an empty excel file. What I actually want to do is to convert BlastP output into excel file. I run blastp with default format like this: blastp -query$i.faa -db VFDB_database.fas -out VFDB_blast -num_threads 14 -evalue 0.01

ctb commented 6 years ago

maybe try -outfmt 7?

https://www.ncbi.nlm.nih.gov/books/NBK279682/

--titus

mariemh23 commented 6 years ago

it does not work either. In addition, the format 7 does not allow me to have the information I need.

ctb commented 6 years ago

"It does not work either" -> the command itself doesn't work, or?

And I might be able to help if you tell me what information you're looking for, but it's hard for me to guess :)

If you are looking for reciprocal best hit kinds of things, you might look up dammit (https://dammit.readthedocs.io/en/latest/)

mariemh23 commented 6 years ago

Ok sorry! the command works but still have an empty file. What i try to do is to compare bacteria protein sequences against virulence factors database. And when i use the output file by default parameter , I get the ID of the virulence gene and it function and the bacteria from which the gene comes i.e

VFG000365(gb|NP_405474) (ybtP) lipoprotein inner membrane ABC-transporter [Yersiniabactin (VF0136)] [Yersinia pestis CO92]

ctb commented 6 years ago

On Mon, Nov 13, 2017 at 02:38:28PM +0000, mariemh23 wrote:

Ok sorry! the command works but still have an empty file. What i try to do is to compare bacteria protein sequences against virulence factors database. And when i use the output file by default parameter , I get the ID of the virulence gene and it function and the bacteria from which the gene comes i.e

VFG000365(gb|NP_405474) (ybtP) lipoprotein inner membrane ABC-transporter [Yersiniabactin (VF0136)] [Yersinia pestis CO92]

I see, and with the different output type you're just getting the accession IDs... hmm. Yes, you'll need a script of some sort. I would suggest looking over on biostars to see if there is something there that is ready made for you.

best, --titus