Sorting from the lowest fold change should show the most negative fold changes first if there are any, and sorting from the highest fold change should show the most positive fold changes first.
The "highest" p-value - the most interesting one - is the one closest to zero. The user should be bable see the smallest p-values on top: they are likely to have both the most negative, and the most positive fold changes.
To implement this: the "-" could be like a zero fold change, and "-" could be treated like p-value 1.
Alternative: assume the user never wants to see - on top when sorting by fold change, or p-value, so always put them on the bottom.
Sorting from the lowest fold change should show the most negative fold changes first if there are any, and sorting from the highest fold change should show the most positive fold changes first.
The "highest" p-value - the most interesting one - is the one closest to zero. The user should be bable see the smallest p-values on top: they are likely to have both the most negative, and the most positive fold changes.
To implement this: the "-" could be like a zero fold change, and "-" could be treated like p-value 1.
Alternative: assume the user never wants to see - on top when sorting by fold change, or p-value, so always put them on the bottom.