10-30-2012
Quote:
Originally Posted by
empyrean
Hi..
...
Quote:
Example files are
Snp file
SNP | Ref | Alt |
10 | A | C |
19 | G | C |
30 | C | T |
42 | A | G |
Sequence :
>sequence1
CTAGAATCAAAGCAAGAATACACTCTTTTTTTTGGAAAAGAATATCTCATGTTTGCTCTT
...
Quote:
Another thing is if we take the snp position, and if there are any snps in 10 bases difference, we need to replace that snp position with "N". In the above example in first two positions as the difference is 9 we are replacing the other element with 'N'.
---------- Post updated at 04:01 PM ---------- Previous update was at 11:20 AM ----------
Took my code off as it might be confusing for everyone..
I'm working on a response but it may not be done much before midnight tonight.
Does the text above in red mean that the table entry:
should cause bases being changed by other table entries for bases 9 through 18 and 20 through 29 should be changed to "N" or should it only cause bases 10 through 18 and 20 through 28 to be changed to "N"? (In other words, is "
in 10 bases difference" inclusive or exclusive?)
In response to the text above in blue, I wish you had left the first part of your code that gave the name of the script that you want to use and the arguments you want to pass to that script.
Also, do your sequence input files contain only one sequence, or would you like it to be able to contain multiple sequences and have the script produce an output table for each sequence found in the input sequence file(s)?
9 More Discussions You Might Find Interesting
1. AIX
I was wondering if anybody can help me with this. I have the following code to look for a space in position #48 and I want to change it so it looks in position 48, 59, and 50 for spaces. How can I do that?
Here's the current code -
grep -v '^.\{48\}].*' <infile> > <outfile>
Any help would... (3 Replies)
Discussion started by: nelson553011
3 Replies
2. Shell Programming and Scripting
Hi dear friends,
Im writing a shell script which has to select the strings based on the position.
but the problem is there is no field seperator.
Normally a datafile contains 2000 records (lines) and each line is of size 500 charecters.
I want to select the fields from all the lines which... (10 Replies)
Discussion started by: ganapati
10 Replies
3. Shell Programming and Scripting
Hi
this script adds text in the correct place on one line only, in a script.
awk 'BEGIN{
printf "Enter residue and chain information: "
getline var < "-"
split(var,a)
}
/-s rec:/{$7=a; }
{print}' FLXDOCK
but I need the same info added at position 7 on line 34 and... (1 Reply)
Discussion started by: gav2251
1 Replies
4. Shell Programming and Scripting
I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX.
awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile
But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
Discussion started by: halplessProblem
9 Replies
5. Shell Programming and Scripting
brw------- 1 oracle dba 49, 21 Apr 05 11:45 dprod_0000018
brw------- 1 oracle dba 49, 26 Apr 05 11:45 dprod_0000019
brw------- 1 oracle dba 43, 93 Feb 02 2011 dprod_000002
brw------- 1 oracle dba 49, 27 Apr 05 11:45 dprod_0000020... (4 Replies)
Discussion started by: Daniel Gate
4 Replies
6. Shell Programming and Scripting
Hi all,
I have a file like this
ID 3BP5L_HUMAN Reviewed; 393 AA.
AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3;
DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot.
DT 05-JUL-2004, sequence version 1.
DT 05-SEP-2012, entry version 71.
FT COILED 59 140 ... (1 Reply)
Discussion started by: manigrover
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all, I have column 2 full of values like HIVE4A-56 and HIVE4-56. I want to convert all values like HIVE4A-56 to HIVE4-56.
So basically I want to delete all single alphabets before the '-' which is always preceded by a number. Values already in the desired format should remain unchanged... (4 Replies)
Discussion started by: ames1983
4 Replies
8. Shell Programming and Scripting
I have two text files as shown below
cat file1.txt
Id leng sal mon
25671 34343 56565 5565
44888 56565 45554 6868
23343 23423 26226 6224
77765 88688 87464 6848
66776 23343 63463 4534
cat file2.txt
Id number
25671 34343
76767 34234
23343 23423
66776 23343 (4 Replies)
Discussion started by: halfafringe
4 Replies
9. Shell Programming and Scripting
I have a positions file with markers in col1 and position defined by chromosome and location in col2 and col3
m1 ch1 1
m2 ch1 5
m3 ch1 50
m4 ch2 567
m5 ch2 4567
m6 ch2 7766
m7 ch2 554433
m8 ch3 76
m9 ch3 456
m10 ch3 2315
Given a set of query marker, I would like to know what are the... (1 Reply)
Discussion started by: jianp83
1 Replies
LEARN ABOUT PHP
set_color
set_color(1) fish set_color(1)
NAME
set_color - set_color - set the terminal color
set_color - set the terminal color
Synopsis
set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]
Description
Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple,
cyan, white and normal.
o -b, --background Set the background color
o -c, --print-colors Prints a list of all valid color names
o -h, --help Display help message and exit
o -o, --bold Set bold or extra bright mode
o -u, --underline Set underlined mode
o -v, --version Display version and exit
Calling set_color normal will set the terminal color to whatever is the default color of the terminal.
Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey
font color, while set_color --bold white will result in a white font color.
Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator.
set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and
incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of
ncurses and recompile fish against it in order to fix this issue.
Version 1.23.1 Sun Jan 8 2012 set_color(1)