Question: (Closed) Error in identifying overlapping reads
0
gravatar for jaqx008
9 months ago by
jaqx00860
jaqx00860 wrote:

Hello All, I encounter this error in my shell script and I really don't see anything wrong with the python script the error is complaining about.

Error ^

  SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "error: invalid input format")?
      File "modifiedOverhangScript.py", line 72
        print "error: invalid input format"

Line 71 and 72 of py script looks like this (below).

if len(samplefields)  #alignment format are tabulated with at least two fields. 
print "error: invalid input format"

I tried to change the line to

print(int "error: invalid input format")

it gave errors again.

pythonscript shell mapping • 308 views
ADD COMMENTlink modified 9 months ago • written 9 months ago by jaqx00860
1

The correct syntax would be

if len(samplefields):  #alignment format are tabulated with at least two fields. 
    print ("error: invalid input format")
ADD REPLYlink written 9 months ago by i.sudbery6.3k

Hello jaqx008!

We believe that this post does not fit the main topic of this site.

This post appears to be a basic programming query rather than a bioinformatics question. There are other, more suitable, venues for posting questions of a purely programming nature.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink written 9 months ago by i.sudbery6.3k

It might be a good call to close this post, but I am having some difficulty determining what is being described (which I think is the main problem):

Situation #1) If "modifiedOverhangScript.py" is provided in some sort of bioinformatics package (even though the name makes it sound more like a "template"), then I think it is OK to post. You may even get some feedback about how to accomplish your goal with existing programs (although I am still not entirely clear about your goal: PEAR would be one way to merge R1 and R2 reads, de novo assembly programs like Velvet or Oases can create contigs from fragments between fragments, etc.).

Situation #2) If this is a custom script, then you have to be responsible for your own coding and maintenance of the script (and I will change the status back to closed, since that is indeed not appropriate to post on Biostars).

If you think this is Situation #1, can you please provide some more background information about your goals?

ADD REPLYlink modified 9 months ago • written 9 months ago by Charles Warden7.4k

I disagree - this is a question dealing with programming syntax. If OP wanted to address the underlying task, they can always open a new post with the focus on the task and not on a line of programming. I'm closing the question.

BTW, these moderating discussions can be had at the Biostars slack

ADD REPLYlink written 9 months ago by RamRS24k

Ok - I can still add comments. So, if there is a concern and the user can add comments (without a separate answer), then I think that is OK.

So, unless I am misunderstanding something, it is good that this is closed rather than deleted (although something completely unrelated, like a movie advertisement, should be deleted).

I sometimes add to discussions years after the initial post. So, if the appropriateness is unclear, I would lean towards letting the post remain open (but not provide an answer). I think this is probably better than closing/deleting unclear cases, since I believe openness is necessary to encourage participation (my opinion is that we don't want people to be afraid to try to contribute, because a lot of marginally related posts are being closed by the moderators).

I don't believe I previously saw Biostars slack, so thank you for pointing that out.

ADD REPLYlink written 9 months ago by Charles Warden7.4k

Hello jaqx008!

We believe that this post does not fit the main topic of this site.

Please see i.sudbery's comment

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink written 9 months ago by RamRS24k
Please log in to add an answer.
The thread is closed. No new answers may be added.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1847 users visited in the last hour