These are chat archives for dereneaton/ipyrad

Sep 2016
Emily Warschefsky
Sep 09 2016 16:11
@edgardomortiz thanks for the tip!
Emily Warschefsky
Sep 09 2016 16:35
Hey @dereneaton - I see you mentioned this earlier, but I'm not sure how to implement it. I have 12 sublibraries that I demultiplexed separately, in separate folders, and want to merge them together now. I have tried things like: ipyrad -m testmerge ./Sample_1/params-ip_all.txt ./Sample_2/params-ip_all.txt, but get the following error: Merging assemblies: ['./Sample_1/params-ip_all.txt', './Sample_2/params-ip_all.txt'] Error: Steps >1 () requested but no current assembly found - /scratch/ewars001/ipyrad/Lane1/ip_all
Emily Warschefsky
Sep 09 2016 22:06
@dereneaton - I think I've got it working now, using the absolute instead of relative file paths...
Emily Warschefsky
Sep 09 2016 22:25
@dereneaton - scratch that. it is still not working - it's not able to look for files in paths other than the present working directory. In this case, do you have some tips on the best file structure to simply work with ipyrad? I have 12 sublibraries in different folders that need to be demultiplexed independently before combining them for s2-7. I had been using a loop to cd to a subfolder and run s1 with a single params file for everything, but it seems like this method isn't compatible with the merging process.
Deren Eaton
Sep 09 2016 22:36
Hmm, I'll look into that. The recommended workflow for merging is as follows:
## create a params file for each library
ipyrad -n lib1
ipyrad -n lib2
ipyrad -n lib3

## enter the locations of your data files for each and 
## give all assemblies the same project dir, e.g., 
------- ipyrad params file (v.0.3.41)-------------------------------------------
lib1                                 ## [0] [assembly_name]: Assembly name. Used to name output directories for assembly $
elephants                            ## [1] [project_dir]: Project dir (made in curdir if not present)
ipsimdata/rad_example_R1_.fastq.gz   ## [2] [raw_fastq_path]: Location of raw non-demultiplexed fastq files
ipsimdata/rad_example_barcodes.txt   ## [3] [barcodes_path]: Location of barcodes file

## Demultiplex each library
ipyrad -p params-lib1.txt -s 1
ipyrad -p params-lib2.txt -s 1
ipyrad -p params-lib3.txt -s 1

## merge the libraries into a new name
ipyrad -m 3libs params-lib1.txt params-lib2.txt params-lib3.txt

  ipyrad [v.0.3.41]
  Interactive assembly and analysis of RAD-seq data

  Merging assemblies: ['params-lib1.txt', 'params-lib2.txt', 'params-lib3.txt']
  loading Assembly: lib1
  from saved path: ~/Documents/ipyrad/tests/elephants/lib1.json
  loading Assembly: lib2
  from saved path: ~/Documents/ipyrad/tests/elephants/lib2.json
  loading Assembly: lib3
  from saved path: ~/Documents/ipyrad/tests/elephants/lib3.json

  Merging succeeded. New params file for merged assembly:


### continue working with merged library
ipyrad -p params-3libs.txt -s 2
sorry that's not very readable, we need to put this in the docs.
And in your project dir (here called elephtants/) you'll have your demultiplexed libraries each separated:
drwxrwxr-x 2 deren deren  4096 Sep  9 18:29 lib1_fastqs/
-rw-rw-r-- 1 deren deren 33229 Sep  9 18:29 lib1.json
drwxrwxr-x 2 deren deren  4096 Sep  9 18:30 lib2_fastqs/
-rw-rw-r-- 1 deren deren 33229 Sep  9 18:30 lib2.json
drwxrwxr-x 2 deren deren  4096 Sep  9 18:31 lib3_fastqs/
-rw-rw-r-- 1 deren deren 33229 Sep  9 18:31 lib3.json
drwxrwxr-x 2 deren deren  4096 Sep  9 18:39 3libs_edits/
-rw-rw-r-- 1 deren deren 47783 Sep  9 18:39 3libs.json
Emily Warschefsky
Sep 09 2016 22:52
Okay, that looks very helpful, I will try running it that way. Thanks!