Search Results

Search: Posts Made By: kswapnadevi
1,098
Posted By Scrutinizer
The OP's post is contradictory, because on the...
The OP's post is contradictory, because on the first line it says it should be followed by a number, but if ChrX is valid too then indeed it should be /^Chr[0-9X]/
1,098
Posted By Scrutinizer
awk -F- '/^Chr[0-9]/&&!A[$0]++{print $1":"$2-10...
awk -F- '/^Chr[0-9]/&&!A[$0]++{print $1":"$2-10 FS $2+10}' file
1,098
Posted By ctsgnb
grep ^Chr. input | while read a ; do echo...
grep ^Chr. input | while read a ; do echo "${a%-*}:$((${a#*-}-10))-$((${a#*-}+10))" ; done
1,098
Posted By cabrao
awk -F"-" '/^Chr[0-9[X]/{print...
awk -F"-" '/^Chr[0-9[X]/{print $1":"$2-10"-"$2+10}' file
1,955
Posted By frans
Please, use code tags to make the code more...
Please, use code tags to make the code more readable.
Howto:

Select the text corresponding to code
Click on the 'code' button in the editor's...
2,724
Posted By Scrutinizer
Try this Posix version, which should be...
Try this Posix version, which should be insensitive to leading spaces:
INFILE=infile # Put the name of your file here
while read line
do
case $line in
"Initial dG"*)
printf...
2,724
Posted By frans
What's the output of this: #!/bin/bash while...
What's the output of this:
#!/bin/bash
while IFS=':=' read A B C
do
echo "A='$A' B='$B' C='$C'"
done <$INFILE

---------- Post updated at 23:06 ---------- Previous update was at 21:52...
2,724
Posted By Scrutinizer
This means the output of program $INFILE is...
This means the output of program $INFILE is presented as a file. Using backticks instead means the output of program $INFILE is presented as a variable.

Correct would be:
done < "$INFILE"


...
4,088
Posted By DGPickett
You can make a sort of cheap xml parser of sed: ...
You can make a sort of cheap xml parser of sed:

sed -n '
s/.*<free-energy>\([^<]*\)<.*/\1/p
t
/<base-id>/{
:loop
N
/<\/base-id-3p>/!b loop
...
1,081
Posted By frans
#!/bin/bash while IFS='<>' read Null Tag Val...
#!/bin/bash
while IFS='<>' read Null Tag Val Null
do
case $Tag in
free-energy)
echo $Val
Pos=0 ;;
position)
((Pos++))
((Pos%2)) && echo -n...
2,743
Posted By Chubler_XL
How about this awk script (process.awk): ...
How about this awk script (process.awk):

BEGIN {
FS=">";RS=">";ORS="";
}
$NF { d++
system("mkdir dir"d);
print ">"$0 > ("dir"d"/input");
system("cd dir"d"; mfold seq=input");
}
...
2,743
Posted By danmero
This want to be a solution for your problem awk...
This want to be a solution for your problem
awk -F\> '/>/{++d;system("mkdir "d)}NF{print > (d"/"$NF)}' file
however if you expect something else please post the required output base on original...
2,232
Posted By rdcwayx
Little issue, but simple code. awk...
Little issue, but simple code.

awk 'BEGIN{RS=ORS=">";FS="\n"} NF==2' infile

sample1:1:1:1057:7503#0 0 0
>sample1:1:1:1057:12664#0 0 0
>sample1:1:1:1059:6357#0 0 0
>sample1:1:1:1059:10418#0 0...
2,232
Posted By ygemici
try like this samtools faidx Bos_taurusUMD3.fa...
try like this
samtools faidx Bos_taurusUMD3.fa "$line"
2,232
Posted By hravisankar
Shell scripting problem
My input file (data1) is like this
Chr8:4000-4500
Chr10:4000-4600

I written a shell program like this.
while read LINE;
do echo "$LINE";
samtools faidx Bos_taurusUMD3.fa "$line";
done <...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 04:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy