This is a test version of Biostars. For the public version, visit https://www.biostars.org.
perl extract-same-SNP.pl script

Hi How I can find extract-same-SNP.pl file ( of this script) . Actually this script doesnt work in my shell ( No such file or directory) and I had many search about that, but I dont have result .
Please help me
My command is: perl extract-same-SNP.pl lrrbaf.txt snphwe.map result.txt

genome

Where did you find that script. Please post the complete outputs.

Thank you very much for your attention. Actually a student introduced to me this script, but now I dont have access to him.anyway I have a big file about 600K like this (included 6 columns):

Name                                   Chr                Position                GType   LRR      BAF
250506CS3900371000001_1255.1    11  35339124    BB  0.05070077  1
250506CS3900386000001_696.1 16  62646307    AB  0.0280207   0.4966125
250506CS3900487100001_1521.1    14  1110363         AB  0.0893564   0.5164082
OAR3_OAR1_104576120   7   89431547    BB  0.008588651 1 
OAR3_104560208                  3   26298017    BB  0.004256991    -0.0254199     
OAR3_OAR1_104560208                3   41355381    BB     -0.1070691   0.9926475
OAR3_OAR1_104565009           5       1110363         AB  0.0893564   0.5164082
OAR3_74546684.1                 3   89431547    BB  0.008588651 1
OAR3_74587791.1                 3   26298017    BB  0.004256991    -0.0254199 
OAR3_OAR1_104586789                3   62646307    AB  0.0280207   0.4966125
OAR3_74642696.1                 3   62646307    AB  0.0280207   0.4966125
OAR3_OAR1_104596004                3   148802744   BB      -0.06002647 0.9837347
OAR3_OAR1_104602631                 3   81648528    BB  0.05812091  0.996112

also I have map file (included 4 columns):

1   OAR3_OAR1_104560208 0   104447957
1   OAR3_OAR1_104565009 0   104452758
1   OAR3_OAR1_104576120 0   104463869
1   OAR3_OAR1_104586789 0   104474543
1   OAR3_OAR1_104596004 0   104483758
1   OAR3_OAR1_104602631 0   104490385

How I can extract the rows which are numbered of a big file by map like this:

OAR3_OAR1_104596004                3   148802744   BB      -0.06002647 0.9837347
OAR3_OAR1_104560208                3   41355381    BB     -0.1070691   0.9926475
OAR3_OAR1_104565009           5       1110363         AB  0.0893564   0.5164082
OAR3_OAR1_104602631                 3   81648528    BB  0.05812091  0.996112
OAR3_OAR1_104586789                3   62646307    AB  0.0280207   0.4966125
OAR3_OAR1_104576120   7   89431547    BB  0.008588651 1

I added markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

My system does not respond by these methods. I dont have output file

This may require an AWK solution. grep with -f FILE can take days or weeks with a reasonably large file. Hosein, did you not try the join command given by Pierre in the other question?

Yes I did many try, like this: join -t $'\t' -1 1 -2 1 <(sort -t $'\t' -k1,1 440s.txt) <(sort -t $'\t' -k1,1 440.txt)> Output . But output file is empty

0 answers

No answers yet.

Log in to answer this question.