Spreadsheet formatting [on hold] The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsMerge fields in a fileHow to paste an HTML table into Libre Office Calc without losing structureMove files/table following selection criteriaReplace values in a tableDelete columns that sum to zeroExtracting quoted and labelled data from a given columnFinding the different possible combinationsMatch File1 with File 2Compare Columns of genes in file and output the gene and number of column it is present in linuxAdding more information to a string

What is this lever in Argentinian toilets?

He got a vote 80% that of Emmanuel Macron’s

Cooking pasta in a water boiler

Change bounding box of math glyphs in LuaTeX

What's the point in a preamp?

What information about me do stores get via my credit card?

How many people can fit inside Mordenkainen's Magnificent Mansion?

Can the DM override racial traits?

Did the new image of black hole confirm the general theory of relativity?

Arduino Pro Micro - switch off LEDs

Make it rain characters

Create an outline of font

Simulation of a banking system with an Account class in C++

How did passengers keep warm on sail ships?

How is simplicity better than precision and clarity in prose?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Segmentation fault output is suppressed when piping stdin into a function. Why?

What was the last x86 CPU that did not have the x87 floating-point unit built in?

Relations between two reciprocal partial derivatives?

Python - Fishing Simulator

When did F become S in typeography, and why?

What can I do if neighbor is blocking my solar panels intentionally?

What are these Gizmos at Izaña Atmospheric Research Center in Spain?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?



Spreadsheet formatting [on hold]



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election ResultsMerge fields in a fileHow to paste an HTML table into Libre Office Calc without losing structureMove files/table following selection criteriaReplace values in a tableDelete columns that sum to zeroExtracting quoted and labelled data from a given columnFinding the different possible combinationsMatch File1 with File 2Compare Columns of genes in file and output the gene and number of column it is present in linuxAdding more information to a string



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















2 formats



I have gene name in column 1 and respective diseases in column 2 as shown in table 1,Now i want the format to be gene name in column1 and all respective diseases row wise as shown in table 2, Can anyone suggest me solution for reformatting this table










share|improve this question









New contributor




Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by Ruban Savvy, HBruijn, Stephen Kitt, Rui F Ribeiro, Romeo Ninov Apr 10 at 8:36



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1





    This is not related to Unix & Linux, but with the use of Office suites. Please read unix.stackexchange.com/help/on-topic

    – Panki
    Apr 10 at 7:07






  • 4





    I'm voting to close this question as off-topic because this is wrt office suite & not Unix and Linux

    – Ruban Savvy
    Apr 10 at 7:27











  • It maybe technically 'off-topic' but the solution is simple and introduces OP to the command line..... isn't that a good thing? We all had to start somewhere.

    – bu5hman
    Apr 10 at 8:01











  • Voting to leave open, since it's about what appears to be LibreOffice on Ubuntu.

    – muru
    Apr 10 at 8:05











  • It’s about LibreOffice, yes, but there’s nothing specific to Unix/Linux here. I don’t know whether there’s a better SE for this though...

    – Stephen Kitt
    2 days ago

















0















2 formats



I have gene name in column 1 and respective diseases in column 2 as shown in table 1,Now i want the format to be gene name in column1 and all respective diseases row wise as shown in table 2, Can anyone suggest me solution for reformatting this table










share|improve this question









New contributor




Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by Ruban Savvy, HBruijn, Stephen Kitt, Rui F Ribeiro, Romeo Ninov Apr 10 at 8:36



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1





    This is not related to Unix & Linux, but with the use of Office suites. Please read unix.stackexchange.com/help/on-topic

    – Panki
    Apr 10 at 7:07






  • 4





    I'm voting to close this question as off-topic because this is wrt office suite & not Unix and Linux

    – Ruban Savvy
    Apr 10 at 7:27











  • It maybe technically 'off-topic' but the solution is simple and introduces OP to the command line..... isn't that a good thing? We all had to start somewhere.

    – bu5hman
    Apr 10 at 8:01











  • Voting to leave open, since it's about what appears to be LibreOffice on Ubuntu.

    – muru
    Apr 10 at 8:05











  • It’s about LibreOffice, yes, but there’s nothing specific to Unix/Linux here. I don’t know whether there’s a better SE for this though...

    – Stephen Kitt
    2 days ago













0












0








0


1






2 formats



I have gene name in column 1 and respective diseases in column 2 as shown in table 1,Now i want the format to be gene name in column1 and all respective diseases row wise as shown in table 2, Can anyone suggest me solution for reformatting this table










share|improve this question









New contributor




Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












2 formats



I have gene name in column 1 and respective diseases in column 2 as shown in table 1,Now i want the format to be gene name in column1 and all respective diseases row wise as shown in table 2, Can anyone suggest me solution for reformatting this table







bioinformatics table






share|improve this question









New contributor




Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Apr 10 at 8:17









roaima

46.2k758124




46.2k758124






New contributor




Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Apr 10 at 6:38









Yashwanth KumarYashwanth Kumar

1




1




New contributor




Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Yashwanth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by Ruban Savvy, HBruijn, Stephen Kitt, Rui F Ribeiro, Romeo Ninov Apr 10 at 8:36



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.







put on hold as off-topic by Ruban Savvy, HBruijn, Stephen Kitt, Rui F Ribeiro, Romeo Ninov Apr 10 at 8:36



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 1





    This is not related to Unix & Linux, but with the use of Office suites. Please read unix.stackexchange.com/help/on-topic

    – Panki
    Apr 10 at 7:07






  • 4





    I'm voting to close this question as off-topic because this is wrt office suite & not Unix and Linux

    – Ruban Savvy
    Apr 10 at 7:27











  • It maybe technically 'off-topic' but the solution is simple and introduces OP to the command line..... isn't that a good thing? We all had to start somewhere.

    – bu5hman
    Apr 10 at 8:01











  • Voting to leave open, since it's about what appears to be LibreOffice on Ubuntu.

    – muru
    Apr 10 at 8:05











  • It’s about LibreOffice, yes, but there’s nothing specific to Unix/Linux here. I don’t know whether there’s a better SE for this though...

    – Stephen Kitt
    2 days ago












  • 1





    This is not related to Unix & Linux, but with the use of Office suites. Please read unix.stackexchange.com/help/on-topic

    – Panki
    Apr 10 at 7:07






  • 4





    I'm voting to close this question as off-topic because this is wrt office suite & not Unix and Linux

    – Ruban Savvy
    Apr 10 at 7:27











  • It maybe technically 'off-topic' but the solution is simple and introduces OP to the command line..... isn't that a good thing? We all had to start somewhere.

    – bu5hman
    Apr 10 at 8:01











  • Voting to leave open, since it's about what appears to be LibreOffice on Ubuntu.

    – muru
    Apr 10 at 8:05











  • It’s about LibreOffice, yes, but there’s nothing specific to Unix/Linux here. I don’t know whether there’s a better SE for this though...

    – Stephen Kitt
    2 days ago







1




1





This is not related to Unix & Linux, but with the use of Office suites. Please read unix.stackexchange.com/help/on-topic

– Panki
Apr 10 at 7:07





This is not related to Unix & Linux, but with the use of Office suites. Please read unix.stackexchange.com/help/on-topic

– Panki
Apr 10 at 7:07




4




4





I'm voting to close this question as off-topic because this is wrt office suite & not Unix and Linux

– Ruban Savvy
Apr 10 at 7:27





I'm voting to close this question as off-topic because this is wrt office suite & not Unix and Linux

– Ruban Savvy
Apr 10 at 7:27













It maybe technically 'off-topic' but the solution is simple and introduces OP to the command line..... isn't that a good thing? We all had to start somewhere.

– bu5hman
Apr 10 at 8:01





It maybe technically 'off-topic' but the solution is simple and introduces OP to the command line..... isn't that a good thing? We all had to start somewhere.

– bu5hman
Apr 10 at 8:01













Voting to leave open, since it's about what appears to be LibreOffice on Ubuntu.

– muru
Apr 10 at 8:05





Voting to leave open, since it's about what appears to be LibreOffice on Ubuntu.

– muru
Apr 10 at 8:05













It’s about LibreOffice, yes, but there’s nothing specific to Unix/Linux here. I don’t know whether there’s a better SE for this though...

– Stephen Kitt
2 days ago





It’s about LibreOffice, yes, but there’s nothing specific to Unix/Linux here. I don’t know whether there’s a better SE for this though...

– Stephen Kitt
2 days ago










1 Answer
1






active

oldest

votes


















-1














Save the table in csv format (e.g. myTable.csv), manipulate the columns in awk or similar



awk -F, ' print $2","$1"' myTable.csv > myNewTable.csv


Open the new file (myNewTable.csv).



EDIT Misread the question as pointed out by @roaima



you could try this instead



d=disease.csv

#get rid of the spaces for convenience
sed -i 's/ /_/g' $d

# collect all of the unique identifiers into a list
for i in $(grep -Po "^.[^,]*" < $d | sort | uniq)

#load all diseases associated with the uid into an array
do b=($(grep -Po "(?<=$i,).*" $d))

#output the uid and array comma separated
(IFS=,; echo "$i,$b[*]")

done > sorted.$d





share|improve this answer

























  • That transposes the list. It doesn't do what the OP's asking.

    – roaima
    Apr 10 at 8:25

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









-1














Save the table in csv format (e.g. myTable.csv), manipulate the columns in awk or similar



awk -F, ' print $2","$1"' myTable.csv > myNewTable.csv


Open the new file (myNewTable.csv).



EDIT Misread the question as pointed out by @roaima



you could try this instead



d=disease.csv

#get rid of the spaces for convenience
sed -i 's/ /_/g' $d

# collect all of the unique identifiers into a list
for i in $(grep -Po "^.[^,]*" < $d | sort | uniq)

#load all diseases associated with the uid into an array
do b=($(grep -Po "(?<=$i,).*" $d))

#output the uid and array comma separated
(IFS=,; echo "$i,$b[*]")

done > sorted.$d





share|improve this answer

























  • That transposes the list. It doesn't do what the OP's asking.

    – roaima
    Apr 10 at 8:25















-1














Save the table in csv format (e.g. myTable.csv), manipulate the columns in awk or similar



awk -F, ' print $2","$1"' myTable.csv > myNewTable.csv


Open the new file (myNewTable.csv).



EDIT Misread the question as pointed out by @roaima



you could try this instead



d=disease.csv

#get rid of the spaces for convenience
sed -i 's/ /_/g' $d

# collect all of the unique identifiers into a list
for i in $(grep -Po "^.[^,]*" < $d | sort | uniq)

#load all diseases associated with the uid into an array
do b=($(grep -Po "(?<=$i,).*" $d))

#output the uid and array comma separated
(IFS=,; echo "$i,$b[*]")

done > sorted.$d





share|improve this answer

























  • That transposes the list. It doesn't do what the OP's asking.

    – roaima
    Apr 10 at 8:25













-1












-1








-1







Save the table in csv format (e.g. myTable.csv), manipulate the columns in awk or similar



awk -F, ' print $2","$1"' myTable.csv > myNewTable.csv


Open the new file (myNewTable.csv).



EDIT Misread the question as pointed out by @roaima



you could try this instead



d=disease.csv

#get rid of the spaces for convenience
sed -i 's/ /_/g' $d

# collect all of the unique identifiers into a list
for i in $(grep -Po "^.[^,]*" < $d | sort | uniq)

#load all diseases associated with the uid into an array
do b=($(grep -Po "(?<=$i,).*" $d))

#output the uid and array comma separated
(IFS=,; echo "$i,$b[*]")

done > sorted.$d





share|improve this answer















Save the table in csv format (e.g. myTable.csv), manipulate the columns in awk or similar



awk -F, ' print $2","$1"' myTable.csv > myNewTable.csv


Open the new file (myNewTable.csv).



EDIT Misread the question as pointed out by @roaima



you could try this instead



d=disease.csv

#get rid of the spaces for convenience
sed -i 's/ /_/g' $d

# collect all of the unique identifiers into a list
for i in $(grep -Po "^.[^,]*" < $d | sort | uniq)

#load all diseases associated with the uid into an array
do b=($(grep -Po "(?<=$i,).*" $d))

#output the uid and array comma separated
(IFS=,; echo "$i,$b[*]")

done > sorted.$d






share|improve this answer














share|improve this answer



share|improve this answer








edited 13 hours ago

























answered Apr 10 at 7:59









bu5hmanbu5hman

1,356415




1,356415












  • That transposes the list. It doesn't do what the OP's asking.

    – roaima
    Apr 10 at 8:25

















  • That transposes the list. It doesn't do what the OP's asking.

    – roaima
    Apr 10 at 8:25
















That transposes the list. It doesn't do what the OP's asking.

– roaima
Apr 10 at 8:25





That transposes the list. It doesn't do what the OP's asking.

– roaima
Apr 10 at 8:25



Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.