This is a test version of Biostars. For the public version, visit https://www.biostars.org.
writing bash script with python

Hello all,

I am trying to write multiple bash scripts by python .I am using PyCharm. when I am trying to paste my code by "vim" to shell the structure will be destroyed and I will give so many errors.while my code in PyCharm is ok.

any help will be appreciated, Thanks

python bash pycharm

This sounds quite confusing. To start with, a python script cannot be a bash script since those are different languages. What are you copy pasting? How are you executing the python script?

@mary99 seems to be creating/writing multiple bash scripts programmatically with python using a python IDE called PyCharm. Now I have confused myself :)

I'm familiar with the IDE, the rest of the question is rather odd. Let's try to preserve our sanity and wait for an enlightening explanation :-)

Sorry :) I am working with so many fastq and need to run some code with PBS script.so it means in order to creat PBS script i am using python.when i am writing my script that should be in each PBS i can have them in one line by PyCharm and it is good becuse the width of window in PyCharm is good enough but it is not the case with vim.i hope now be clear if not i can explain more.

Your question really is unclear. We need more information to be able to help you. Please take the time to clarify your question and post a new one that clearly states what you are trying to accomplish, how, and what seems to not work.

Please take the time to read this before posting your new question: How To Ask Good Questions On Technical And Scientific Forums

Why are you trying to paste things from IDE into vim or terminal(?). Write the commands you need into a set of files and then submit those individually to PBS.

If I get you correctly, you are trying to create a high number of job submission scripts for a server. This is probably a bad approach. You probably need one script that treats all your fastq files, ideally in parallel on a certain number of CPUs. Please, do consider posting a new question where you define your problem properly.

I think the real goal is to just use snakemake with a cluster (possibly through a wrapper script), but OP is new so doesn't know about that possibility yet.

I assume OP deleted this thread, hopefully a new post will be made so we can help.

I did wanted to close originally but I didn't. We'll see if a new question by OP will come up.

To me it looks like very early steps in programming which are the most painful, so I'm in favor of the benefit of the doubt.

I think you are right. Suggesting a new, better formed question but this question should be deleted IMO.

Just because you see a line wrapping in vim doesn't mean it's actually on two lines. That is, you can have two lines on the screen that are one line in the file. The same is true in PyCharm I suspect. Python will be perfectly happy with this.

0 answers

No answers yet.

Log in to answer this question.