Hi BioStar Community,
I have the following text file where I have predicted miRNAs for numerous sequences. I would appreciate if someone can help me out with these questions.
1) miRNA that targets maximum number of sequences (most common miRNA).
2) miRNA that targets minimum number of sequences
3) Generate a list of unique miRNAs and prints the accession numbers which it targets.
Thanks :-)
>NC_002.1
hsa-miR-3
hsa-miR-6
hsa-miR-32
hsa-miR-4
hsa-miR-46
hsa-miR-43
hsa-miR-18
hsa-miR-13
hsa-miR-44
hsa-miR-445
hsa-miR-467
hsa-miR-454
hsa-miR-698
hsa-miR-421
>NC_003
hsa-miR-4
hsa-miR-46
hsa-miR-43
hsa-miR-18
>NC_04
hsa-miR-86
hsa-miR-94
hsa-miR-31
hsa-miR-328
>NC_06
hsa-miR-467
hsa-miR-454
hsa-miR-698
hsa-miR-421
>NC_008
hsa-miR-6
hsa-miR-32
hsa-miR-4
hsa-miR-46
hsa-miR-43
hsa-miR-18
>NC_009
hsa-miR-43
hsa-miR-18
hsa-miR-13
hsa-miR-44
>NC_11
hsa-miR-445
hsa-miR-467
hsa-miR-454
hsa-miR-698
hsa-miR-421
>NC_012
hsa-miR-467
hsa-miR-454
>NC_023
hsa-miR-6
hsa-miR-32
hsa-miR-4
hsa-miR-46
hsa-miR-43
hsa-miR-18
hsa-miR-13
hsa-miR-44
hsa-miR-86
hsa-miR-94
hsa-miR-31
hsa-miR-328
hsa-miR-445
hsa-miR-467
>NC_045
hsa-miR-31
hsa-miR-328
hsa-miR-445
hsa-miR-467
>NC_00455
hsa-miR-6
hsa-miR-32
hsa-miR-4
hsa-miR-46
hsa-miR-43
>NC_0875
hsa-miR-86
hsa-miR-94
hsa-miR-31
hsa-miR-328
I added code 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:
This is not the first time that I have to tell you this. Please put some effort when formatting posts.
Interesting guidelines for posting can be found in the following posts:
I also modified your title to make it more specific. "Processing txt file" doesn't mean anything at all.
When you want help on a Q&A forum it's good practice to show what you tried and what didn't work. We will be more eager to point out your mistakes or put you back on the right track. We don't like open questions such as "please write a script for me".
Hi Carlo and WouterDeCoster,
Thanks for your suggestions. @WouterDeCoster, you are right that we need to put in efforts to write code and thats how a person learns... however, as a beginner, its difficult to write ever small chunks of code. As a faculty in Biology, I have some ideas in my mind but completely lacks computational expertise. Hence, I think that this platform should also promote project based collaborations which might lead to publication.
This one isn't too hard, and the only way to learn coding is by trying.
I'm not sure how that would work.
@WouterDeCoster, Thanks for the insights. However, I think that technology has not only transformed biology (Big Data) but has omitted physical boundaries for collaboration. For example https://www.nature.com/articles/ncomms12846 this research article performs data analysis using crowd where co-authors are across the globe and hardly know each other.
There is an issue with the formatting of your text file. Please use "code formatting" (the 101010 box) to improve its readability.