I have seen several posts now that contain screen shots of console output or data in text. Is it a new trend? Whatever, it's not a good thing to do in general, so please don't.
Cons:
- Costs a lot of bandwidth
- Cannot be copy-pasted into google (which might resolve it in 99%of cases) or for use in testing
- uses crappy image hosters (adds, data disappears after a while renders the post imcomplete)
- hard to see what is relevant in a large window or full desktop
- reveals information you didn't intend to share
- low accessibility / (screen reader, contrast)
- ...
Pros:
- Some rare Java/JavaScript apps don't allow to copy-paste text from error messages.
- ???
Instead:
> Copy paste your error message and format it as code (101010 button) or ``
post the output of head mydata.txt
.
Or post longer code, output, or data as a gist (e.g.: http://gist.github.com). Even then you should try to embed the most relevant portion in the post by just adding the link to it:
https://gist.github.com/mdondrup/4adaac1ab045e9008caa1e54cc2fc940
One should not need much more space, if one focusses on the relevant portion of the data. Complete datasets need to be uploaded to some cloud storage service anyway, if people like to share those at all.
Posting FASTA files
copy pasting fasta content will immediately render like this, because the >
is markup for 'cite':
mygeneid ACGT ACGT
Mark your Fasta content as code when embedding it:
>mygeneid
ACGT
ACGT
Gists -edit- could once be easily embedded into Biostars: like so ....
\gist 2059
But this has changed, just in case you find the old post New Feature: Using Shortcuts To Embed Content Such As Gist Or To Display Biostar Specific Links
Or if the output/code is very long, maybe copy it into a GitHub gist to share (https://gist.github.com)
Indeed, and that's often also more convenient for indentation and rendered nicely on biostars.
Added an example of gist embedding.
Perhaps make this a tutorial on post formatting (I see you added fasta) so we can always refer to this for new users?
Changed the type to Tutorial. It would be nice if Tutorials that are intended as site documentation could be aggregated somewhere. I remember that Ram made a lot of posts about that, but now I can hardly find them.
I think this post deals with 'embedding' or 'sharing' code, data aspect. If you have any opinion on
, let me know.
Here are links
That would be useful indeed, I'll bookmark it for myself to refer new users to this whenever needed. Perhaps the title could be changed to "How to use biostars: properly formatting code and data" or something similar if you agree.
I think most often sharing an example of your data should do the trick. I'm not going to click random dropbox links :-)
An idea was to pin these posts to Biostars Homepage (so that new users can find easily before posting). But it didn't happened yet.
What is the concensus about using pastebin for code/input files? I've always used it in the past, and there is an option for the paste to remain permanently I believe.
I think it is ok as a last resort, but it has adds and can only be embedded using javascript <iframe src="<a href=" https:="" pastebin.com="" embed_iframe="" 4pGfMsEj"="" rel="nofollow">https://pastebin.com/embed_iframe/4pGfMsEj" style="border:none;width:100%"></iframe>
And as you see if you try to use iframe html code, weird things happen!
Yeah I would normally just paste a link directly to it, especially if it was a reallt long file