This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to move files into samples.txt

How do you move files into a samples.txt folder? For example, I have in my RAW_DATA Folder:

JRPR_RNAseq_IS_53_CAACAATG_Arabidosis_I1187_L1_R1.fastq.bz2 JRPR_RNAseq_IS_53_CAACAATG_Arabidosis_I1187_L1_R2.fastq.bz2

I read: https://anvio.org/help/main/artifacts/samples-txt/

My sample has R1 and R2 which are paired ends. What is the command to get these samples into a sample.txt file?

The result would look like this I think: JRPR_RNAseq_IS_53_CAACAATG_Aquilegia_I1187_L1.

samplestxt

as far as I can see, samples is not a folder but a text file.

A TAB-delimited file to describe samples and paired-end FASTQ files associated with them. By doing so, this file type links sample names to raw sequencing reads.

Hi Pierre,

How do I generate the samples.txt file? I have the samples in my RAW_DATA folder that is in my Arabidopsis directory. Is there a command to get everything into a samples.txt?

ls -1 *.bz2 > samples.txt

This will make a file called samples.txt with each file on a new line.

Isn't that always the case :-)

Perhaps OP can at least use this file as a starter to get it in the right format.

1 answer

I realize that you are new to this, but what you are asking is akin to going to a French cusine website and asking how to fry an egg. There is nothing wrong in not knowing how to fry an egg, nor is there anything wrong in not knowing how to create a text file. Yet those are basic questions that more appropriate to be learned from YouTube videos, internet tutorials, books, etc.

You can create a text file in your favorite editor that exists in your GUI environment (Windows, iOS, Android, etc) and upload it to the Linux server. Or if Linux is sharing the same computer with your GUI environment, simply copy the file into your Linux directory.

Linux has text and graphical editors, but I don't know which Linux you are using. It is a safe bet that you have nano editor, so you type:

nano samples.txt

That will open an editor window, where you can type or paste file names, and maybe with the directory prepended to them (for example, RAW_DATA/my_file_1, RAW_DATA/my_file_2, etc). When you are done, save the file by typing "CTRL+X" and that should do it. It may work if you type gedit samples.txt in which case a graphical text editor will open. If that works, those editors look like most other GUI point-and-click text editors.

Log in to answer this question.