How to convert the process radtags log to a tsv

23 views
Skip to first unread message

Edie Nissen

unread,
Jan 10, 2023, 12:18:26 PM1/10/23
to Stacks
Hello, I am very new to STACKS, and just completed my process_radtags run. Everything seems to have run smoothly, however I was wondering if there was a script to convert the process_radtags log into a tsv file. More specifically, I want to convert the data under per_barcode_raw_read_counts to run some analyses in R (which is suggested in the paper written by Rivera-Colón & Catchen, 2021 under section 2.4.1). Please let me know if you can help.

Thanks,

Edie

Catchen, Julian

unread,
Jan 11, 2023, 10:43:08 AM1/11/23
to stacks...@googlegroups.com

Hi Edie,

 

The process_radtags.log file is a tab-separated file (with some sections of the file separated by blank lines). To make it easy to extract particular things from the file, use the stacks-dist-extract utility, which is included in the Stacks install. If you run it on the log file, it will tell you what you can extract:

 

stacks-dist-extract process_radtags.log 

per_file_raw_read_counts

total_raw_read_counts

 

You can then select one of the sections and extract that:

 

stacks-dist-extract process_radtags.log per_file_raw_read_counts

 

That is best for R. If you want it to print things out in human-readable table, do:

 

stacks-dist-extract --pretty process_radtags.log per_file_raw_read_counts

 

Best,

 

julian

Edie Nissen

unread,
Jan 11, 2023, 11:42:30 AM1/11/23
to stacks...@googlegroups.com
Thanks for the reply!

Does this command create an output file for me to then use in R? Or am I able to use the whole populations.log file in R

--
Stacks website: http://catchenlab.life.illinois.edu/stacks/
---
You received this message because you are subscribed to a topic in the Google Groups "Stacks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stacks-users/JgPwhiaO-L8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stacks-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stacks-users/DM6PR11MB255427343FBA37A4DA0F80C0A7FC9%40DM6PR11MB2554.namprd11.prod.outlook.com.


--
Edie Nissen (she/her)
Biology M.S. Student
Department of Applied Ecology
North Carolina State University

Catchen, Julian

unread,
Jan 11, 2023, 12:22:06 PM1/11/23
to stacks...@googlegroups.com

Redirect the output into a file for use in R:

 

stacks-dist-extract process_radtags.log per_file_raw_read_counts > myRfile.tsv

Edie Nissen

unread,
Jan 11, 2023, 12:43:11 PM1/11/23
to stacks...@googlegroups.com
Awesome. Thanks so much for the help!

--
Stacks website: http://catchenlab.life.illinois.edu/stacks/
---
You received this message because you are subscribed to a topic in the Google Groups "Stacks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stacks-users/JgPwhiaO-L8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stacks-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages