I am having a little trouble with some things using the code below:
1.
The user enters the variant and that value is used in the python script. However, I am not sure how to save that value inputed as a text file in a specific directory (C:\Users\cmccabe\Desktop\Python27\).
2. Not sure how save the text file like this "(NM_004004.4:user input value)"
3. I am hoping a python command can be used in the menu
I'd suggest putting a loop in your menu, this avoids building up a new stack instance every time you call menu again from within an existing menu.
Also note that backslash is an escape character in bash and so would need to be escaped (either by enclosing in single quotes or by adding an additional backslash). More readable and acceptable for both windows and bash is to use forward slash.
Noe I just used printf to output then entered variant and redirected this to the NM_004004.4 file as requested.
See changes in red below.
This User Gave Thanks to Chubler_XL For This Post:
I am trying to open the bashpasrse.sh and have created bat file in windows.
Code:
I have a similar batch that works fine but for some reason this does not. I am testing the code in bits so hopefully the gjb2 line works, but the others do not. Thank you .
Nevermind, I must have typed something wrong.... its running now. However, I get this error:
Code:
Welcome to annovar, please make a selection from the MENU
==================================
1 GJB2 analysis
2 MECP2 analysis
3 Phox2B analysis
4 Exit
==================================
Your choice: 1
What is the id of the patient getting GJB2 analysis : GJB-1
Enter variant: c.203G>A
usage: run_batch_job.py [-h] [-v] [-b BUILD] INPUT OUTPUT TYPE
run_batch_job.py: error: argument INPUT: can't open 'C:/Users/cmccabe/Desktop/Py
thon27/c.203G>A.txt': [Errno 22] invalid mode ('r') or filename: 'C:/Users/cmcca
be/Desktop/Python27/c.203G>A.txt'
c:\cygwin\home\cmccabe\bashparse.sh: line 38: C:/Users/cmccabe/Desktop/annovar/G
JB-1.txt: No such file or directory
I can see that the c.203G>A.txt is not created in the directory, but I thought it should? Thanks.
After the user inputs the variant (c.203G>A), that as well as "NM_004004.4:" are saved to the
Code:
c:/Users/cmccabe/Desktop/Python27
directory.
It looks like the NM_004004.4 is being printed to the desktop, but a file is not being saved that combines the input with that text.
I am trying to select a file in bash and save it to a directory. The below does run but no selected file is saved. Thank you :).
bash
# select file
printf "please select a file to analyze with entered gene or genes \n"
select file in $(cd... (4 Replies)
I am looking for a way to start a script and have it prompt for a password that will be used later on in the script to SSH to another host and to SFTP. I don't want the password to be hard coded. Below is my script with the actual IP's and usernames removed.
#!/usr/bin/expect -f... (2 Replies)
I am trying to use the text of one file as a text file name with and the text of another as the contents of that text file. Is this possible? Thank you :).
For example, in the two files attached, target.txt has:
1.txt
2.txt
and out_parse.txt has:
13 20763642 20763642 C G... (5 Replies)
The below code works great if the user inputs a single value. The sed command applies the NM_ with the user input it is saved to a file. However, if two values are entered the below does not work. Can both values be saved at the same time if they are entered in windows format? Thank you :).
... (6 Replies)
wget -x -i link.txt
The above downloads and create unique entries for the 97 links in the text file. However, each new file is saved as CM080 with a FILE extention. Is there a way to convert each file in that directory to a .txt? The 97 files are in... (12 Replies)
Hi ,
i want to save the output of my c ++ code to a text file which is in a particular path :
this is part of my code and I dunno where I am doing it wrong
do
{
for( int i = 0; i < l; ++i )
{
std::cout << 1 + k * i + index << ' ';
}
... (2 Replies)
Hi friends,
I am pretty new to shell scripting, please help me in this Scenario.
for example, If I have one file called input.txt
once I run the script,
1.It has to delete the old input.txt and create the new input.txt (if old input.txt is not there, no offence, just it has to create a... (2 Replies)
Hi Guys,
I have blank file A.txt
I will run the script xyz.sh
First i want to open a.txt file...
Now i will enter some data like
XYZ
ABC
PQR
..
Save it and keep continue my script....
END of my script.
Thanks (1 Reply)
Hi,
i have 2 input files which are file1.txt and file2.txt. I need to extract data from file1.txt and file2.txt and save it in file3.txt like example below:-
File1.txt
ID scrap1
Name scrap1
start 1
end 10
ID scrap2
Name scrap2
start 11
end ... (4 Replies)
hello
on my ultra 5 (under debian) obp since I activated an error saving mode display.
Since it starts and displays <power save >, then this is prologue to sleep for hours.
i can ejecting the cdrom works, I hear the fans ....
I have not access of OpenBoot (stop + a).
can i do an hard... (0 Replies)