Obi concatenate issue
Hello!
We are trying to concatenate samples together while also inserting their file names, so that we can later view them individually. We are trying to add this concatenate step right after assigning each sequence record to the corresponding sample/marker combination (Wolf tutorial with the obitools3).
We have a txt file with the sample names that looks like this:
drwxr-xr-x 9 username staff 288 Jul 31 19:27 /Users/username/projectname/output/foldername/samplename1.obidms drwxr-xr-x 38 username staff 1216 Jul 31 19:29 /Users/username/projectname/output/foldername/samplename2.obidms
And our code looks like this:
# Creating txt document
ls -d ${OUTPUT}/foldername/*.obidms > ${OUTPUT}/foldername/filelist.txt
#Concatenating files together
(
for combined in ${OUTPUT}/foldername/*
do
obi cat -c $combined/tagged_identified_sequences $combined/combined_sequences &
done
)
We also tried this code:
for i in ${OUTPUT}/foldername/*; do echo Filename : "$i";echo;obi cat "$i"; done > bigfile
We also tried merging less (two) samples together using -c, as we noticed that this should be incorporated into the command
obi cat -c /Users/username/projectname/output/foldername/samplename1.obidms/VIEWS/tagged_identified_sequences.obiview -c /Users/username/projectname/output/foldername/samplename2.obidms/VIEWS/tagged_identified_sequences.obiview /Users/username/projectname/output/foldername/combined_first2
But for either option, we end up with an empty VIEW folder and an error:
Traceback (most recent call last): File "/Users/username/obitools3/obi3-env/bin/obi", line 4, in <module> __import__('pkg_resources').run_script('OBITools3==3.0.0b27', 'obi') File "/Users/username/obitools3/obi3-env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 666, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Users/username/obitools3/obi3-env/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1462, in run_script exec(code, namespace, namespace) File "/Users/username/obitools3/obi3-env/lib/python3.7/site-packages/OBITools3-3.0.0b27-py3.7-macosx-10.9-x86_64.egg/EGG-INFO/scripts/obi", line 62, in <module> config[root_config_name]['module'].run(config) File "python/obitools3/commands/cat.pyx", line 84, in obitools3.commands.cat.run TypeError: Argument 'view' has incorrect type (expected obitools3.dms.view.view.View, got obitools3.dms.dms.DMS)
What would be the best way to solve this?
Thank you for your help,
Lotte